コード例 #1
0
        protected void fillClaimStatusReview(int clientd)
        {
            ClaimManager objClaimManager = new ClaimManager();
            List<Carrier> objCarrier = new List<Carrier>();
            objCarrier = objClaimManager.GetAllCarrier(clientd);
            if (objCarrier != null)
            {
                CollectionManager.FillCollection(ddlClaimCarrier, "CarrierID", "CarrierName", objCarrier);
            }

            List<ContactList> objContactlist = new List<ContactList>() ;

             List<Contact> listContact= ContactManager.GetAll(clientd).ToList();

             ContactList objcontact1;
             foreach (Contact data in listContact)
             {
                 objcontact1 = new ContactList();
                 objcontact1.ContactID = data.ContactID;
                 objcontact1.FirstName = data.FirstName;
                 objcontact1.LastName = data.LastName;
                 objcontact1.Email = data.Email;
                 objcontact1.CompanyName = data.CompanyName;
                 objcontact1.IdOf = "c";
                 objContactlist.Add(objcontact1);
             }
             List<AdjusterMaster> listAdjuster = CRM.Data.Account.AdjusterManager.GetAll(clientd).ToList();
            foreach (AdjusterMaster data in listAdjuster)
            {
                objcontact1 = new ContactList();
                objcontact1.ContactID = data.AdjusterId;
                objcontact1.FirstName = data.FirstName;
                objcontact1.LastName = data.LastName;
                objcontact1.Email = data.email;
                objcontact1.CompanyName = data.CompanyName;
                objcontact1.IdOf = "a";
                objContactlist.Add(objcontact1);
            }
            gvSelectRecipients.DataSource = objContactlist.AsQueryable();
               gvSelectRecipients.DataBind();
        }
コード例 #2
0
        protected void fillClaimStatusReview(int clientd)
        {
            ClaimManager objClaimManager = new ClaimManager();

            List<Carrier> objCarrier = new List<Carrier>();
            objCarrier = objClaimManager.GetAllCarrier(clientd);

            List<ContactList> objContactlist = new List<ContactList>();

            List<Contact> listContact = ContactManager.GetAll(clientd).ToList();

            List<StatusMaster> statusMasters = null;

            List<ExpenseType> expenseTypes = null;

            ContactList objcontact1;
            foreach (Contact data in listContact)
            {
                objcontact1 = new ContactList();
                objcontact1.ContactID = data.ContactID;
                objcontact1.FirstName = data.FirstName;
                objcontact1.LastName = data.LastName;
                objcontact1.Email = data.Email;
                objcontact1.CompanyName = data.CompanyName;
                objcontact1.IdOf = "c";
                objContactlist.Add(objcontact1);
            }
            List<AdjusterMaster> listAdjuster = CRM.Data.Account.AdjusterManager.GetAll(clientd).ToList();
            foreach (AdjusterMaster data in listAdjuster)
            {
                objcontact1 = new ContactList();
                objcontact1.ContactID = data.AdjusterId;
                objcontact1.FirstName = data.FirstName;
                objcontact1.LastName = data.LastName;
                objcontact1.Email = data.email;
                objcontact1.CompanyName = data.CompanyName;
                objcontact1.IdOf = "a";
                objContactlist.Add(objcontact1);
            }
            gvSelectRecipients.DataSource = objContactlist.AsQueryable();
            gvSelectRecipients.DataBind();

            gvSelectRecipientsStatus.DataSource = objContactlist.AsQueryable();
            gvSelectRecipientsStatus.DataBind();

            gvSelectRecipientsExpense.DataSource = objContactlist.AsQueryable();
            gvSelectRecipientsExpense.DataBind();

            statusMasters = StatusManager.GetList(clientd);
            if (statusMasters!=null)
            {
            CollectionManager.FillCollection(ddlClaimStatusReview, "StatusId", "StatusName", statusMasters);
            }
            if (objCarrier!=null)
            {
            CollectionManager.FillCollection(ddlClaimCarrier, "CarrierID", "CarrierName", objCarrier);
            CollectionManager.FillCollection(ddlExpenseClaimCarrier, "CarrierID", "CarrierName", objCarrier);
            }

            Client objClient = ClaimsManager.GetClientByUserId(SessionHelper.getUserId());
            if (objClient!=null)
            {
                txtAdjusterComapnyName.Text = objClient.BusinessName;
                txtExpenseAdjusterComapnyName.Text = objClient.BusinessName;
            }

            using (ExpenseTypeManager repository = new ExpenseTypeManager())
            {
                expenseTypes = repository.GetAll(clientd).ToList();
            }
            if (expenseTypes!=null)
            {
            Core.CollectionManager.FillCollection(ddlExpenseType, "ExpenseTypeID", "ExpenseName", expenseTypes);
            }
        }