Ejemplo n.º 1
0
        public void bindData()
        {
            clientID = Core.SessionHelper.getClientId();
            List<ExpenseType> expenseTypes = null;

            using (ExpenseTypeManager repository = new ExpenseTypeManager()) {
                expenseTypes = repository.GetAll(clientID).ToList();
            }

            gvExpenseType.DataSource = expenseTypes;
            gvExpenseType.DataBind();
        }
Ejemplo n.º 2
0
        protected void gvExpenseType_Sorting(object sender, GridViewSortEventArgs e)
        {
            IQueryable<ExpenseType> expenseTypes = null;

            bool descending = false;

            if (ViewState[e.SortExpression] == null)
                descending = false;
            else
                descending = !(bool)ViewState[e.SortExpression];

            ViewState[e.SortExpression] = descending;

            using (ExpenseTypeManager repository = new ExpenseTypeManager()) {
                expenseTypes = repository.GetAll(clientID);

                gvExpenseType.DataSource = expenseTypes.orderByExtension(e.SortExpression, descending);

                gvExpenseType.DataBind();
            }
        }
        private void bindInvoiceExpenses()
        {
            List<ExpenseType> expenses = null;
            int clientID = Core.SessionHelper.getClientId();

            using (ExpenseTypeManager repository = new ExpenseTypeManager()) {
                expenses = repository.GetAll(clientID).ToList();
            }

            Core.CollectionManager.FillCollection(ddlExpenses, "ExpenseTypeID", "ExpenseName", expenses);
        }
Ejemplo n.º 4
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);
            }
        }
Ejemplo n.º 5
0
        private void bindData()
        {
            List<ExpenseType> expenseTypes = null;

            using (ExpenseTypeManager repository = new ExpenseTypeManager()) {
                expenseTypes = repository.GetAll(clientID).ToList();
            }

            gvExpenseType.DataSource = expenseTypes;
            gvExpenseType.DataBind();
        }