private void LoadContactsDropdowns()
        {
            Business.Sales.Contacts       Obj        = new Business.Sales.Contacts();
            Business.Sales.Account        AccountObj = new Business.Sales.Account();
            Entity.Sales.GetAccountsParam Param      = new Entity.Sales.GetAccountsParam
            {
                Name                 = null,
                OfficePhone          = null,
                SourceActivityTypeId = Convert.ToInt32(ActityType.Customer),
                ChildActivityTypeId  = Convert.ToInt32(ActityType.Account)
            };
            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);
            }
            ddlAccount.DataSource     = AccountObj.GetAllAccounts(Param);
            ddlAccount.DataTextField  = "Name";
            ddlAccount.DataValueField = "Id";
            ddlAccount.DataBind();
            ddlAccount.InsertSelect();

            ddlDesignation.DataSource     = Obj.GetDesignations();
            ddlDesignation.DataTextField  = "DesignationName";
            ddlDesignation.DataValueField = "DesignationMasterId";
            ddlDesignation.DataBind();
            ddlDesignation.InsertSelect();
        }
Пример #2
0
        public List <Entity.Sales.GetAccounts> GetAllAccounts(Entity.Sales.GetAccountsParam Param)
        {
            List <Entity.Sales.GetAccounts> AllAccountList = new List <Entity.Sales.GetAccounts>();
            GetAccountsParamDbModel         p = new GetAccountsParamDbModel();

            Param.CopyPropertiesTo(p);
            AccountDataAccess.GetAllAccounts(p).CopyListTo(AllAccountList);
            return(AllAccountList);
        }
        private void LoadAccountList()
        {
            Business.Sales.Account        Obj   = new Business.Sales.Account();
            Entity.Sales.GetAccountsParam Param = new Entity.Sales.GetAccountsParam {
                Name = null, OfficePhone = null, SourceActivityTypeId = Convert.ToInt32(ActityType.Customer), ChildActivityTypeId = Convert.ToInt32(ActityType.Account)
            };

            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);
            }

            gvAccounts.DataSource = Obj.GetAllAccounts(Param);
            gvAccounts.DataBind();
        }
Пример #4
0
 private void LoadAccountList()
 {
     Business.Sales.Account        objAccount       = new Business.Sales.Account();
     Entity.Sales.GetAccountsParam getAccountsParam = new Entity.Sales.GetAccountsParam {
         Name = null, OfficePhone = null, SourceActivityTypeId = Convert.ToInt32(ActityType.Customer), ChildActivityTypeId = Convert.ToInt32(ActityType.Account)
     };
     if (HttpContext.Current.User.IsInRole(Entity.HR.Utility.CUSTOMER_LIST_SHOW_ALL))
     {
         getAccountsParam.AssignEngineer = 0;
     }
     else
     {
         getAccountsParam.AssignEngineer = int.Parse(HttpContext.Current.User.Identity.Name);
     }
     ddlAccounts.DataSource     = objAccount.GetAllAccounts(getAccountsParam);
     ddlAccounts.DataTextField  = "Name";
     ddlAccounts.DataValueField = "Id";
     ddlAccounts.DataBind();
 }