public List <Entity.Sales.GetOpportunity> GetAllOpportunity(Entity.Sales.GetOpportunityParam Param)
        {
            List <Entity.Sales.GetOpportunity> AllOpportunityList = new List <Entity.Sales.GetOpportunity>();
            GetOpportunityParamDbModel         p = new GetOpportunityParamDbModel();

            Param.CopyPropertiesTo(p);
            OpportunityDataAccess.GetAllOpportunities(p).CopyListTo(AllOpportunityList);
            return(AllOpportunityList);
        }
示例#2
0
 private void LoadOpportunity()
 {
     Business.Sales.Opportunity       Obj   = new Business.Sales.Opportunity();
     Entity.Sales.GetOpportunityParam Param = new Entity.Sales.GetOpportunityParam {
         BestPrice = null, CommitStageId = null, Name = null, SourceActivityTypeId = Convert.ToInt32(ActityType.Lead), ChildActivityTypeId = Convert.ToInt32(ActityType.Opportunity)
     };
     if (HttpContext.Current.User.IsInRole(Entity.HR.Utility.CUSTOMER_LIST_SHOW_ALL))
     {
         Param.AssignEngineer = 0;
     }
     else
     {
         Param.AssignEngineer = int.Parse(HttpContext.Current.User.Identity.Name);
     }
     ddlOpportunity.DataSource     = Obj.GetAllOpportunity(Param);
     ddlOpportunity.DataTextField  = "Name";
     ddlOpportunity.DataValueField = "Id";
     ddlOpportunity.DataBind();
 }