当前位置: 首页>>代码示例>>C#>>正文


C# SessionScopeWrapper.CreateSQLQuery方法代码示例

本文整理汇总了C#中SessionScopeWrapper.CreateSQLQuery方法的典型用法代码示例。如果您正苦于以下问题:C# SessionScopeWrapper.CreateSQLQuery方法的具体用法?C# SessionScopeWrapper.CreateSQLQuery怎么用?C# SessionScopeWrapper.CreateSQLQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SessionScopeWrapper的用法示例。


在下文中一共展示了SessionScopeWrapper.CreateSQLQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetMemberPhoneStep

 public static void GetMemberPhoneStep( IMeetingTeam meetingteam, out System.String result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper())
     {
         string sql = "select phone from userinfo where userid='"+ meetingteam.UserID.ToString()+"'";
      		    result=session.CreateSQLQuery(sql).UniqueResult<string>();
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.f079173c-44c3-44ad-988a-162546948e85.codesnippet.cs

示例2: GetTotalAnticRepBudgetStep

 public static void GetTotalAnticRepBudgetStep( ICustfinancial custfinancial, out System.Decimal result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper()) {
         string sql = "select sum(revenue) from order_summary_detail where ordertype='Anticipated' and opportunityid='" + custfinancial.Id.ToString() + "'";
         decimal fswon = session.CreateSQLQuery(sql).UniqueResult<decimal>();
         result = fswon;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.c4acbacc-2243-4250-ab17-b9babe70791e.codesnippet.cs

示例3: GetFirstServiceWonStep

 public static void GetFirstServiceWonStep(ICustfinancial custfinancial, out System.DateTime result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper()) {
         string sql = "select min(actualclose) from opportunity_product where opportunityid='" + custfinancial.Id.ToString() + "'";
         DateTime fswon = session.CreateSQLQuery(sql).UniqueResult<DateTime>();
         result = fswon;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.ddc198ee-b1e1-461e-b386-34bdc17a7e81.codesnippet.cs

示例4: GetActualOrderRevStep

 public static void GetActualOrderRevStep( IOrderSummaryDetail ordersummarydetail, out System.Decimal result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper()) {
         string sql = "select revenue from order_summary_detail where ordertype='Actual' and order_summary_detailid='" + ordersummarydetail.Id.ToString() + "'";
         decimal fswon = session.CreateSQLQuery(sql).UniqueResult<decimal>();
         result = fswon;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.e3f1c4a7-9019-4574-b4d9-ac01ee5bf85a.codesnippet.cs

示例5: GetBusDevRepStep

 public static void GetBusDevRepStep( ICustfinancial custfinancial, out System.String result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper()){
     string sql = "select username from userinfo where userid=(select meetingmanager from accountconferon where accountid='"+custfinancial.Accountid+"')";
     string fswon = session.CreateSQLQuery(sql).UniqueResult<string>();
     result=fswon;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.114241c6-5039-47d9-8cad-c47a77a5e6ee.codesnippet.cs

示例6: GetProductName

 public static void GetProductName( IOrderSummaryDetail ordersummarydetail, out System.String result)
 {
     using (ISession session = new SessionScopeWrapper())
     {
         string sql = "select description from product where productid='"+ordersummarydetail.Productid.ToString()+"'";
         string prodname = session.CreateSQLQuery(sql).UniqueResult<string>();
         result=prodname;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.9fd59372-bc1e-4c20-a4c9-8019ea939fc1.codesnippet.cs

示例7: GetWonServiceRevStep

 public static void GetWonServiceRevStep(ICustfinancial custfinancial, out System.Decimal result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper()) {
         string sql = "select sum(extendedprice) from opportunity_product where status='Execution' and opportunityid='" + custfinancial.Id.ToString() + "'";
         decimal fswon = session.CreateSQLQuery(sql).UniqueResult<decimal>();
         result = fswon;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:9,代码来源:.018c5487-6a4d-4414-860a-b224726a4a3d.codesnippet.cs

示例8: GetPrimaryContactPhoneStep2

 public static void GetPrimaryContactPhoneStep2( ICustevent custevent, out System.String result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper())
     {
         string sql = "select top 1 c.workphone from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid where oc.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
         string fswon = session.CreateSQLQuery(sql).UniqueResult<string>();
         result=fswon;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:10,代码来源:.449b8e92-05c5-4cd9-ac83-a4ef9da646e4.codesnippet.cs

示例9: GetServiceNameStep

 public static void GetServiceNameStep( ISalesOrderItem salesorderitem, out System.String result)
 {
     // TODO: Complete business rule implementation
     using (ISession session = new SessionScopeWrapper())
     {
         string sql = "select description from product where productid='"+salesorderitem.Product.Id+"'";
         string prodname = session.CreateSQLQuery(sql).UniqueResult<string>();
         result=prodname;
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:10,代码来源:.6e6a9255-69e0-47e3-9342-31da4705511d.codesnippet.cs

示例10: ValidateCommissionStep

 public static void ValidateCommissionStep(IOpportunity opportunity, out Boolean result)
 {
     // TODO: Complete business rule implementation
     result = false;
     using (ISession session = new SessionScopeWrapper()) {
         string strSQL = "select count(*) from salesorder where salescommission>0 and salescommission2>0 and accountid='"+opportunity.Account.Id.ToString()+"' and opportunityid='"+opportunity.Id.ToString()+"'";
         int salesorder = session.CreateSQLQuery(strSQL).UniqueResult<int>();
         if (salesorder > 0) {
             result = true;
         }
     }
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:12,代码来源:.2fb12515-4dda-400b-8382-43c028b43761.codesnippet.cs

示例11: GetPrimaryContactAddressStep

        public static void GetPrimaryContactAddressStep( ICustevent custevent, out System.String result)
        {
            // TODO: Complete business rule implementation
            using (ISession session = new SessionScopeWrapper())
            {
                string sql = "select top 1 a.address1  from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid left join sysdba.address a on a.entityid=c.contactid where oc.isprimary='T' and a.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
                string add1 = session.CreateSQLQuery(sql).UniqueResult<string>();

                sql = "select top 1 a.address2  from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid left join sysdba.address a on a.entityid=c.contactid where oc.isprimary='T' and a.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
                string add2 = session.CreateSQLQuery(sql).UniqueResult<string>();

                sql = "select top 1 a.city  from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid left join sysdba.address a on a.entityid=c.contactid where oc.isprimary='T' and a.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
                string city = session.CreateSQLQuery(sql).UniqueResult<string>();

                sql = "select top 1 a.state  from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid left join sysdba.address a on a.entityid=c.contactid where oc.isprimary='T' and a.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
                string state = session.CreateSQLQuery(sql).UniqueResult<string>();

                sql = "select top 1 a.postalcode  from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid left join sysdba.address a on a.entityid=c.contactid where oc.isprimary='T' and a.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
                string pcode = session.CreateSQLQuery(sql).UniqueResult<string>();

                sql = "select top 1 a.country  from sysdba.opportunity_contact oc left join sysdba.contact c on oc.contactid=c.contactid left join sysdba.address a on a.entityid=c.contactid where oc.isprimary='T' and a.isprimary='T' and opportunityid='"+custevent.Id.ToString()+"'";
                string country = session.CreateSQLQuery(sql).UniqueResult<string>();

                string fswon = string.Concat(add1," ",add2," ",city,", ",state," ",pcode," ",country);
                result=fswon;
            }
        }
开发者ID:pebre77,项目名称:PrxS2,代码行数:27,代码来源:.4aef644b-2575-4265-a4d4-9e4aa92ed8d4.codesnippet.cs

示例12: ValidateSalesOrderStep

        public static void ValidateSalesOrderStep( IOpportunityProduct opportunityproduct, out Boolean result)
        {
            // TODO: Complete business rule implementation
            result = false;

            using (ISession session = new SessionScopeWrapper()) {
                string strSQL = "select count(*) from salesorderdetail where productid ='"+opportunityproduct.Product.Id.ToString()+"' and salesorderid in  (select salesorderid from salesorder where Actual = 'F' and Opportunityid='"+opportunityproduct.Opportunity.Id.ToString()+"')";
                int salesorder = session.CreateSQLQuery(strSQL).UniqueResult<int>();
                if (salesorder > 0) {
                    result = true;
                }
            }
        }
开发者ID:pebre77,项目名称:PrxS2,代码行数:13,代码来源:.9b3c8ef4-411f-432d-bc04-83edf5772f76.codesnippet.cs

示例13: GetInitialSalesRepStep

 public static void GetInitialSalesRepStep( IOpportunity opportunity, out System.String result)
 {
     // TODO: Complete business rule implementation
     string fswon = string.Empty;
         try{
             using (ISession session = new SessionScopeWrapper())
                 {
                     string sql = "select username from userinfo where userid='"+opportunity.Account.AccountConferon.InitialSalesRep.ToString()+"'";
                     fswon = session.CreateSQLQuery(sql).UniqueResult<string>();
                 }
         }catch(Exception){}
         result=fswon;
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:13,代码来源:.7a18cb3e-8d29-48b0-8b8d-c5d781881ff9.codesnippet.cs

示例14: GetInitialSalesRepStep

        public static void GetInitialSalesRepStep( ICustfinancial custfinancial, out System.String result)
        {
            string fswon = string.Empty;
            try{
             	using (ISession session = new SessionScopeWrapper())
               				{

                    if (!string.IsNullOrEmpty(custfinancial.Account.AccountConferon.InitialSalesRep.ToString()) || custfinancial.Account.AccountConferon.InitialSalesRep.ToString()!=null)
                    {
                        string sql = "select username from userinfo where userid='"+custfinancial.Account.AccountConferon.InitialSalesRep.ToString()+"'";
                        fswon = session.CreateSQLQuery(sql).UniqueResult<string>();
                        }
                    }
            }
            catch(Exception){
            }
            result=fswon;
        }
开发者ID:pebre77,项目名称:PrxS2,代码行数:18,代码来源:.9e211680-369d-4aa2-bb5a-151fb2e8e023.codesnippet.cs

示例15: GetSalesOrdActRevStep

 public static void GetSalesOrdActRevStep(ISalesOrder salesorder, out System.Double result)
 {
     // TODO: Complete business rule implementation
     try{
     using (ISession session = new SessionScopeWrapper()) {
         double fswon=0;
         if (salesorder!=null){
                     if (!string.IsNullOrEmpty(salesorder.Id.ToString())){
                         string sql = "select top 1 ordertotal from salesorder where Actual='T' and anticipatedid='" + salesorder.Id.ToString() + "'";
                         fswon = session.CreateSQLQuery(sql).UniqueResult<double>();
                     }
         }
         if (!string.IsNullOrEmpty(fswon.ToString())){
         result = fswon;
         } else {
         result = 0;
         }
     }
     }
     catch(Exception) { result=0;}
 }
开发者ID:pebre77,项目名称:PrxS2,代码行数:21,代码来源:.eec7addb-ab3c-41fd-90c8-44975b535c83.codesnippet.cs


注:本文中的SessionScopeWrapper.CreateSQLQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。