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; } }
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; } }
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; } }
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; } }
public static void GetActualFSalesOrdersStep( ICustfinancial custfinancial, out object result) { Sage.Platform.Repository.IRepository<ISalesOrder> rep = EntityFactory.GetRepository<ISalesOrder>(); IQueryable qry = (IQueryable)rep; IExpressionFactory ef = qry.GetExpressionFactory(); ICriteria criteria = qry.CreateCriteria(); criteria.Add(ef.Eq("Custfinancial",custfinancial)); criteria.Add(ef.Eq("Actual",false)); result = criteria.List<ISalesOrder>(); }
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; }
public static void DupSalesOrderStep( ICustfinancial custfinancial) { // TODO: Complete business rule implementation }