Exemplo n.º 1
0
        private void PopulateTermsAndConditions()
        {
            try
            {
                _TermAndConditionList                             = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceSalesQuotation()).GetAllTermsAndConditionForQuotation(this.SelectedQuotationID));
                gridTermAndCondition.DataSource                   = _TermAndConditionList;
                gridTermAndCondition.Columns["ID"].Visible        = gridTermAndCondition.Columns["DescriptionToUpper"].Visible = false;
                gridTermAndCondition.Columns["IsActive"].Width    = (int)(gridTermAndCondition.Width * .08);
                gridTermAndCondition.Columns["Description"].Width = (int)(gridTermAndCondition.Width * .7);
                gridTermAndCondition.Columns["Code"].Width        = (int)(gridTermAndCondition.Width * .2);
                gridTermAndCondition.Columns["Code"].ReadOnly     = true;

                headerGroupTermsAndCondition.ValuesSecondary.Heading = string.Format("{0} record(s) found", gridTermAndCondition.Rows.Count);
                btnRemoveTerms.Enabled = (gridTermAndCondition.Rows.Count == 0)? ButtonEnabled.False:ButtonEnabled.True;
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "ControlSalesQuotationTermsAndCondition::PopulateTermsAndConditions", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        public void PopulateAllTermsAndConditions()
        {
            try
            {
                switch (this.ENTITY)
                {
                case APP_ENTITIES.SALES_QUOTATION:
                    //_TermsAndConditionList = AppCommon.ConvertToBindingList<TermsAndConditionModel>((new ServiceSalesQuotation()).GetAllTermsAndCondition(this.SelectedID));
                    break;

                case APP_ENTITIES.SALES_ORDER:
                    //_TermsAndConditionList = AppCommon.ConvertToBindingList<TermsAndConditionModel>((new ServiceSalesOrders()).GetAllTermsAndCondition(this.SelectedID));
                    break;

                case APP_ENTITIES.SALES_ENQUIRY:
                    _TermsAndConditionList = AppCommon.ConvertToBindingList <TermsAndConditionModel>((new ServiceSalesEnquiry()).GetAllTermsAndCondition(this.SelectedID));
                    break;
                }

                gridTerms.DataSource = _TermsAndConditionList;
                gridTerms.Columns["TermID"].Visible = gridTerms.Columns["TermTitle"].Visible = false;
                gridTerms.Columns["TermDescription"].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
                this.gridTerms.CellBorderStyle = DataGridViewCellBorderStyle.None;
                headerGroupTermsAndCondition.ValuesSecondary.Description = string.Format("{0} record(s) found.", _TermsAndConditionList.Count());
                if (_TermsAndConditionList.Count > 0)
                {
                    headerGroupTermsAndCondition.ValuesPrimary.Heading = _TermsAndConditionList[0].TermTitle;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ctrlTermsAndCondition::PopulateAllTermsAndConditions", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 3
0
 public void PopulateAdvanceRequestGrid()
 {
     try
     {
         _AdvanceRequestList            = AppCommon.ConvertToBindingList <AdvanceRequestModel>((new ServiceAdvanceRequest()).GetAllAdvanceRequestsOfEmployeeForStatus(Program.CURR_USER.EmployeeID));
         gridAdvanceRequests.DataSource = _AdvanceRequestList;
         foreach (DataGridViewColumn col in gridAdvanceRequests.Columns)
         {
             col.Visible = false;
         }
         gridAdvanceRequests.Columns["RequestDate"].Visible                                      =
             gridAdvanceRequests.Columns["EmployeeName"].Visible                                 =
                 gridAdvanceRequests.Columns["RequestedAmount"].Visible                          =
                     gridAdvanceRequests.Columns["Remarks"].Visible                              =
                         gridAdvanceRequests.Columns["StatusDescription"].Visible                =
                             gridAdvanceRequests.Columns["ApproverName"].Visible                 =
                                 gridAdvanceRequests.Columns["ApprovalDate"].Visible             =
                                     gridAdvanceRequests.Columns["ApprovedAmount"].Visible       =
                                         gridAdvanceRequests.Columns["RemarksApproved"].Visible  =
                                             gridAdvanceRequests.Columns["ApproverName"].Visible = true;
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "PageUserInfo::PopulateAdvanceRequestGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 4
0
        private void PopulateSalesOrdersGrid()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                this.SelectedOrderID                  = 0;
                tabSalesOrder.Visible                 = false;
                _OrdersList                           = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceSalesOrder()).GetAllSOWithStatusForGridDisplay(SelectedOrderStatusID));
                gridSalesOrders.DataSource            = _OrdersList;
                gridSalesOrders.Columns["ID"].Visible =
                    gridSalesOrders.Columns["DescriptionToUpper"].Visible =
                        gridSalesOrders.Columns["Code"].Visible           =
                            gridSalesOrders.Columns["IsActive"].Visible   = false;

                headerGroupOrderList.ValuesSecondary.Heading = string.Format("{0} record(s) found.", gridSalesOrders.Rows.Count);

                if (gridSalesOrders.Rows.Count > 0)
                {
                    tabSalesOrder.Visible = true;
                }
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "pageSalesOrder::PopulateSalesOrdersGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            this.Cursor = Cursors.Default;
        }
Exemplo n.º 5
0
        private void PopulateTermsListForCategory()
        {
            try
            {
                _termsList = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceTermsAndConditions()).GetAllTermsAndConditionsForCategory(this.SelectedCategoryID));
                gridTermsList.DataSource            = _termsList;
                gridTermsList.Columns["ID"].Visible = gridTermsList.Columns["IsActive"].Visible = gridTermsList.Columns["DescriptionToUpper"].Visible = false;
                gridTermsList.Columns["Description"].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
                headerGroupTnCList.ValuesSecondary.Heading = string.Format("{0} record(s) found", gridTermsList.Rows.Count);

                if (gridTermsList.Rows.Count == 0)
                {
                    btnEditTnC.Enabled = btnDeleteTnC.Enabled = ComponentFactory.Krypton.Toolkit.ButtonEnabled.False;
                }
                else
                {
                    btnEditTnC.Enabled = btnDeleteTnC.Enabled = ComponentFactory.Krypton.Toolkit.ButtonEnabled.True;
                }
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "PageTermsAndConditions::PopulateTnCListForCategory", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private void PopulateDefaultAllouncesGrid()
 {
     try
     {
         _AllouncesList           = AppCommon.ConvertToBindingList <DesignationwiseSalaryHeadModel>((new ServiceDesignationWiseSalary()).GetAllAllouncesSalaryHeadsForDesignation(this.DesignationID, this.employmentTYPE));
         gridAllounces.DataSource = _AllouncesList;
         foreach (DataGridViewColumn col in gridAllounces.Columns)
         {
             col.Visible = false;
         }
         gridAllounces.Columns["IsSelected"].Visible         =
             gridAllounces.Columns["SalaryHeadName"].Visible =
                 gridAllounces.Columns["ApplicableChargesAsString"].Visible =
                     gridAllounces.Columns["SalaryHeadAmount"].Visible      = true;
         gridAllounces.Columns["IsSelected"].Width     = 40;
         gridAllounces.Columns["SalaryHeadName"].Width = (int)(gridAllounces.Width * .4);
         gridAllounces.Columns["SalaryHeadAmount"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight;
         gridAllounces.Columns["SalaryHeadAmount"].DefaultCellStyle.Format    = "0.00";
         decimal totAllounceAmount = _AllouncesList.Sum(x => x.SalaryHeadAmount);
         txtTotalAllounces.Text = headerGroupAllounces.ValuesPrimary.Description = string.Format("{0:0.00}", totAllounceAmount);
         RefreshSummaryControls();
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "ControlCTCConfiguration::PopulateDefaultAllouncesGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 7
0
        private void PopulateEmployeeQualificationGrid()
        {
            try
            {
                _EmployeeQualificationList       = AppCommon.ConvertToBindingList <EmployeeQualificationInfoModel>((new ServiceEmployee()).GetAllQualificationOfEmployee(this.SelectedEmployeeID));
                gridQualificationInfo.DataSource = _EmployeeQualificationList;
                foreach (DataGridViewColumn col in gridQualificationInfo.Columns)
                {
                    col.Visible = false;
                }

                gridQualificationInfo.Columns["QualificationName"].Visible   =
                    gridQualificationInfo.Columns["NameOfInstitute"].Visible =
                        gridQualificationInfo.Columns["Grade"].Visible       = true;
                headerGroupQualificationInfo.ValuesSecondary.Heading         = string.Format("{0} record(s) found.", gridQualificationInfo.Rows.Count);
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "ControlEmployeeOtherInfo::PopulateEmployeeQualificationGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 8
0
        private void pageInventoryItems_Load(object sender, EventArgs e)
        {
            try
            {
                InitializeItemAdditionalInfoControl();
                InitializeItemAttachmentControl();
                InitializeItemAssemblyControll();
                InitializeSuppliersControl();

                SplitContainerMain.SplitterDistance     = (int)(this.Width * .2);
                splitContainerCategory.SplitterDistance = (int)(this.SplitContainerMain.Height * .7);
                splitContainerItemMain.SplitterDistance = (int)(this.SplitContainerMain.Panel2.Width * .5);

                _categoryList = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceInventoryItems()).GetInventoryCategories());
                PopulateInventoryCategories(_categoryList);
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "pageInventoryItems::pageInventoryItems_Load", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 9
0
        private void PopulateFinYears()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                SelectedFinYearID       = 0;
                _FinYearList            = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceMASTERS()).GetAllFinancialYears());
                gridFinYears.DataSource = _FinYearList;

                gridFinYears.Columns["ID"].Visible       =
                    gridFinYears.Columns["Code"].Visible =
                        gridFinYears.Columns["DescriptionToUpper"].Visible =
                            gridFinYears.Columns["IsActive"].Visible       = false;

                headerGroupFinYears.ValuesSecondary.Heading = string.Format("{0} records found", gridFinYears.Rows.Count);
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "PageFinYear::PopulateFinYears", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            this.Cursor = Cursors.WaitCursor;
        }
Exemplo n.º 10
0
 private void PopulateLastEmployerInfoGrid()
 {
     try
     {
         _LastEmployerInfoList           = AppCommon.ConvertToBindingList <LastEmployerInfoModel>((new ServiceEmployee()).GetAllLastEmployerInfo(this.SelectedEmployeeID));
         gridLastEmployerInfo.DataSource = _LastEmployerInfoList;
         // gridLastEmployerInfo.DataSource = (new ServiceEmployee()).GetAllLastEmployerInfo(this.SelectedEmployeeID);
         foreach (DataGridViewColumn col in gridLastEmployerInfo.Columns)
         {
             col.Visible = false;
         }
         gridLastEmployerInfo.Columns["LastEmployerName"].Visible        =
             gridLastEmployerInfo.Columns["LastEmployerAddress"].Visible =
                 gridLastEmployerInfo.Columns["ContactNo"].Visible       = true;
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "ControlEmployeeOtherInfo::PopulateLastEmployerInfoGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 11
0
 private void PopulateInventoryItemsForSelectedCategories()
 {
     gridItems.DataSource = null;
     try
     {
         _ItemsList           = AppCommon.ConvertToBindingList <MultiSelectListItem>((new ServiceInventoryItems()).GetNonAssemblyMultiSelectInventoryItemListForCategory(this.SelectedCategoryID));
         gridItems.DataSource = _ItemsList;
         foreach (DataGridViewColumn col in gridItems.Columns)
         {
             col.Visible = false;
         }
         gridItems.Columns["Description"].Visible = true;
         gridItems.Columns["Selected"].Visible    = true;
         gridItems.Columns["Selected"].Width      = (int)(gridItems.Width * .1);
         gridItems.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
         gridItems.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
         headerGroupChooseItems.ValuesSecondary.Heading = string.Format("{0} records found.", gridItems.RowCount);
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "frmAddAssemblyChildItems::PopulateInventoryItemsForSelectedCategories", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 12
0
        public void PopulateDesignationGrid()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                _DesignationList                       = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceMASTERS()).GetAllDesignation());
                gridDesignations.DataSource            = _DesignationList;
                gridDesignations.Columns["ID"].Visible =
                    gridDesignations.Columns["DescriptionToUpper"].Visible =
                        gridDesignations.Columns["Code"].Visible           =
                            gridDesignations.Columns["IsActive"].Visible   = false;

                headerGroupDesignations.ValuesSecondary.Heading = string.Format("{0} record(s) found.", gridDesignations.Rows.Count);
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "PageCTCConfiguration::PopulateDesignationGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            this.Cursor = Cursors.Default;
        }
Exemplo n.º 13
0
        private void PopulateInventoryItemsForSelectedCategories()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                btnEditItem.Enabled = btnDeleteItem.Enabled = ButtonEnabled.False;
                List <InventoryItemModel> itemModelList = (new ServiceInventoryItems()).GetInventoryItemModelListForCategory(this.SelectedCategoryID);
                _itemList            = AppCommon.ConvertToBindingList <InventoryItemModel>(itemModelList);
                gridItems.DataSource = _itemList;
                foreach (DataGridViewColumn col in gridItems.Columns)
                {
                    col.Visible = false;
                }
                gridItems.Columns["SearchText"].Visible = true;
                gridItems.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
                gridItems.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
                //gridItems.Columns["ID"].Visible = gridItems.Columns["Code"].Visible = gridItems.Columns["DescriptionToUpper"].Visible = false;
                //gridItems.Columns["Description"].DefaultCellStyle.WrapMode = DataGridViewTriState.True;

                headerGroupItemGrid.ValuesPrimary.Heading = string.Format("{0} ({1})", SelectedCategoryName, gridItems.RowCount);
                //FormatItemsGrid();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "pageInventoryItems::PopulateInventoryItemsForSelectedCategories", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            this.Cursor = Cursors.Default;
        }
Exemplo n.º 14
0
        private void PopulateParties()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                _PartiesList                      = new BindingList <SelectListItem>();
                _PartiesList                      = AppCommon.ConvertToBindingList((new ServiceParties()).GetAllParties(this.SelectedPartyType));
                gridParties.DataSource            = _PartiesList;
                gridParties.Columns["ID"].Visible = gridParties.Columns["Code"].Visible = gridParties.Columns["IsActive"].Visible = gridParties.Columns["DescriptionToUpper"].Visible = false;
                gridParties.Columns["Description"].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
                headerGroupParties.ValuesSecondary.Heading = string.Format("{0} record(s) found", gridParties.Rows.Count);


                string title = string.Empty;
                switch (this.SelectedPartyType)
                {
                case "S": title = "SUPPLIERS LIST"; break;

                case "C": title = "CUSTOMERS LIST"; break;

                case "A": title = "AGENTS/CONTRACTORS LIST"; break;
                }
                headerGroupParties.ValuesPrimary.Heading = title;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "pageParties::PopulateParties", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.Cursor = Cursors.WaitCursor;
        }
Exemplo n.º 15
0
        //private void gridDeductions_RowEnter(object sender, DataGridViewCellEventArgs e)
        //{
        //    try
        //    {
        //        this.SelectedEmployeeID = (int)gridDeductions.Rows[e.RowIndex].Cells["ID"].Value;

        //    }
        //    catch (Exception ex)
        //    {
        //        string errMessage = ex.Message;
        //        if (ex.InnerException != null) errMessage += string.Format("\n{0}", ex.InnerException.Message);
        //        MessageBox.Show(errMessage, "ControlEmployeeCTC::gridDeductions_RowEnter", MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    }
        //}
        public void PopulateDefaultDeductionGrid()
        {
            try
            {
                _DeductionList            = AppCommon.ConvertToBindingList <EmployeeSalaryHeadModel>((new ServiceEmployee()).GetAllDeductionsSalaryHeadsForEmployee(this.SelectedEmployeeID));
                gridDeductions.DataSource = _DeductionList;
                foreach (DataGridViewColumn col in gridDeductions.Columns)
                {
                    col.Visible = false;
                }
                gridDeductions.Columns["IsSelected"].Visible         =
                    gridDeductions.Columns["SalaryHeadName"].Visible =
                        gridDeductions.Columns["ApplicableChargesAsString"].Visible =
                            gridDeductions.Columns["SalaryHeadAmount"].Visible      = true;
                gridDeductions.Columns["IsSelected"].Width     = 80;
                gridDeductions.Columns["SalaryHeadName"].Width = (int)(gridDeductions.Width * .4);
                gridDeductions.Columns["SalaryHeadAmount"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight;
                decimal totdeductionAmount = _DeductionList.Sum(x => x.SalaryHeadAmount);
                // txtTotalDeduction.Text = headerGroupDeduction.ValuesPrimary.Description = string.Format("{0:0.00}", totdeductionAmount);
                txtTotalDeduction.Text = totdeductionAmount.ToString();
                RefreshSummaryControls();
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "ControlEmployeeCTC::PopulateDefaultDeductionGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 16
0
        private void PopulateCheckPointsGrid()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                _ProjectCheckList                     = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceMASTERS()).GetAllProjectCheckPoints());
                gridCheckPoints.DataSource            = _ProjectCheckList;
                gridCheckPoints.Columns["ID"].Visible =
                    gridCheckPoints.Columns["DescriptionToUpper"].Visible =
                        gridCheckPoints.Columns["Code"].Visible           =
                            gridCheckPoints.Columns["IsActive"].Visible   = false;

                headerGroupProjectyCheckPoint.ValuesSecondary.Heading = string.Format("{0} record(s) found.", gridCheckPoints.Rows.Count);
            }

            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "pageProjectChecklist::PopulateCheckPointsGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.Cursor = Cursors.Default;
        }
Exemplo n.º 17
0
        public void PopulateLoanDisbursmentGrid()
        {
            try
            {
                _DisbursementList = AppCommon.ConvertToBindingList <LoanDisbursementModel>((new ServiceLoanDisbursement()).GetAllLoanDisbursementList());
                gridLoanDisbursement.DataSource          = _DisbursementList;
                gridLoanDisbursement.ColumnHeadersHeight = 50;
                gridLoanDisbursement.Columns["DisbursementID"].Visible      = false;
                gridLoanDisbursement.Columns["DisbursementDate"].Visible    = true;
                gridLoanDisbursement.Columns["DisbursementDate"].HeaderText = "Date\nDisbursement";
                gridLoanDisbursement.Columns["DisbursementDate"].Width      = 80;
                gridLoanDisbursement.Columns["DisbursementDate"].DefaultCellStyle.Format = "dd/MM/yy";

                gridLoanDisbursement.Columns["EmployeeInfo"].Visible = true;
                //gridLoanDisbursement.Columns["EmployeeInfo"].Width = 150;
                gridLoanDisbursement.Columns["EmployeeInfo"].HeaderText = "Employee Info.";


                gridLoanDisbursement.Columns["LoanInfo"].Visible = true;
                //gridLoanDisbursement.Columns["LoanInfo"].Width = 150;
                gridLoanDisbursement.Columns["LoanInfo"].HeaderText = "Loan Info.";


                gridLoanDisbursement.Columns["DisbursementInfo"].Visible    = true;
                gridLoanDisbursement.Columns["DisbursementInfo"].HeaderText = "Disbursement Info.";
                //gridLoanDisbursement.Columns["DisbursementInfo"].Width = 80;

                gridLoanDisbursement.Columns["StatusInfo"].Visible    = true;
                gridLoanDisbursement.Columns["StatusInfo"].HeaderText = "Status";
                gridLoanDisbursement.Columns["StatusInfo"].Width      = 80;

                gridLoanDisbursement.Columns["AmountGiven"].Visible = true;
                gridLoanDisbursement.Columns["AmountGiven"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                gridLoanDisbursement.Columns["AmountGiven"].HeaderText = "Amount\nLoan";
                gridLoanDisbursement.Columns["AmountGiven"].Width      = 80;

                gridLoanDisbursement.Columns["AmountReceived"].Visible = true;
                gridLoanDisbursement.Columns["AmountReceived"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                gridLoanDisbursement.Columns["AmountReceived"].HeaderText = "Amount\nReceived";
                gridLoanDisbursement.Columns["AmountReceived"].Width      = 80;

                gridLoanDisbursement.Columns["AmountDue"].Visible = true;
                gridLoanDisbursement.Columns["AmountDue"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                gridLoanDisbursement.Columns["AmountDue"].HeaderText = "Amount\nDue";
                gridLoanDisbursement.Columns["AmountDue"].Width      = 80;

                gridLoanDisbursement.Columns["SearchText"].Visible = false;
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "PageLoanDisbursement::PopulateLoanDisbursmentGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 18
0
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         _categoryList = null;
         _categoryList = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceInventoryItems()).GetInventoryCategories());
         PopulateInventoryCategories(_categoryList);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "pageInventoryItems::btnRefresh_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 19
0
 public void PopulateParentItems()
 {
     try
     {
         _assemblyItems = AppCommon.ConvertToBindingList <AssemblyParentItem>((new ServiceInventoryItems()).GetInventoryItemListForAssembly(this.ASSEMBLY_ITEM_ID));
         RefreshParentItemGrid();
         //FormatItemsGrid();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "controlAssemblyComposition::PopulateParentItems", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 20
0
        public void PopulateLeavesGrid()
        {
            try
            {
                // _LeavesList = AppCommon.ConvertToBindingList<LeaveApplicationModel>((new ServiceLeaveApplication()).GetAllLeaveApplicationsForEmp(Program.CURR_USER.EmployeeID));

                _LeavesList = AppCommon.ConvertToBindingList <LeaveApplicationModel>((new ServiceLeaveApplication()).GetAllLeaveApplicationsOfEmployee(Program.CURR_USER.EmployeeID));
                gridLeaveApplications.DataSource = _LeavesList;
                gridLeaveApplications.Columns["ApplicationID"].Visible                    =
                    gridLeaveApplications.Columns["SearchString"].Visible                 =
                        gridLeaveApplications.Columns["ApplicationNo"].Visible            =
                            gridLeaveApplications.Columns["ApplicationDate"].Visible      =
                                gridLeaveApplications.Columns["PreparedByID"].Visible     =
                                    gridLeaveApplications.Columns["ApprovedByID"].Visible =
                                        false;
                int gridWidth = gridLeaveApplications.Width;
                gridLeaveApplications.Columns["ApplicationNoWithDate"].HeaderText = "#Application";
                gridLeaveApplications.Columns["ApplicationNoWithDate"].Width      = (int)(gridWidth * .1);
                gridLeaveApplications.Columns["EmployeeName"].Width      = (int)(gridWidth * .15);
                gridLeaveApplications.Columns["LeaveDescription"].Width  = (int)(gridWidth * .07);
                gridLeaveApplications.Columns["FromDateTime"].HeaderText = "From";
                gridLeaveApplications.Columns["FromDateTime"].Width      = (int)(gridWidth * .07);
                gridLeaveApplications.Columns["FromDateTime"].DefaultCellStyle.Format = "dd MMM hh:mm tt";
                gridLeaveApplications.Columns["ToDateTime"].HeaderText = "Till";
                gridLeaveApplications.Columns["ToDateTime"].DefaultCellStyle.Format = "dd MMM hh:mm tt";
                gridLeaveApplications.Columns["ToDateTime"].Width = (int)(gridWidth * .07);
                gridLeaveApplications.Columns["Remarks"].Width    = (int)(gridWidth * .15);

                gridLeaveApplications.Columns["ApplicationStatus"].Width      = (int)(gridWidth * .05);
                gridLeaveApplications.Columns["ApplicationStatus"].HeaderText = "Status";

                gridLeaveApplications.Columns["PreparedByName"].HeaderText = "Prepared By";
                gridLeaveApplications.Columns["PreparedByName"].Width      = (int)(gridWidth * .15);

                gridLeaveApplications.Columns["ApprovedByName"].HeaderText = "Approved By";
                gridLeaveApplications.Columns["ApprovedByName"].Width      = (int)(gridWidth * .15);



                hederGroupLeaveApplications.ValuesSecondary.Heading = string.Format("{0}Records Found", gridLeaveApplications.Rows.Count);
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "PageUserInfo::PopulateLeavesGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 21
0
 private void PopulateCitiesGrid()
 {
     try
     {
         _citiesList                               = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceMASTERS()).GetAllCitiesGridForState(this.SelectedStateID));
         gridCities.DataSource                     = _citiesList;
         gridCities.Columns["ID"].Visible          = gridCities.Columns["Code"].Visible = gridCities.Columns["IsActive"].Visible = gridCities.Columns["DescriptionToUpper"].Visible = false;
         headerGroupCities.ValuesSecondary.Heading = string.Format("{0} record(s) found.", gridCities.Rows.Count);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "pageLocations::PopulateCitiesGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 22
0
        private void btnSelectProject_Click(object sender, EventArgs e)
        {
            try
            {
                frmGridMultiSelect frm = new frmGridMultiSelect(APP_ENTITIES.ACTIVE_PROJECT);
                frm.SingleSelect = true;
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    this.Cursor = Cursors.WaitCursor;
                    int        selectedProjectID = frm.SelectedItems[0].ID;
                    List <int> _employeeIDs      = (new ServiceAttendance()).GetEmployeeIDsWhoHaveAttendendaceForProject(selectedProjectID);
                    foreach (int empID in _employeeIDs)
                    {
                        OnSiteAttendanceModel  model = new OnSiteAttendanceModel();
                        TBL_MP_Master_Employee emp   = (new ServiceEmployee()).GetEmployeeDbRecordByID(empID);
                        if (emp != null)
                        {
                            model.EmployeeID   = emp.PK_EmployeeId;
                            model.EmployeeCode = emp.EmployeeCode;
                            model.EmployeeName = emp.EmployeeName;
                        }
                        model.AttendanceDate = dtSiteAttendanceDate.Value;

                        model.AttendanceInTime  = new DateTime(model.AttendanceDate.Year, model.AttendanceDate.Month, model.AttendanceDate.Day, 8, 45, 0);
                        model.AttendanceOutTime = new DateTime(model.AttendanceDate.Year, model.AttendanceDate.Month, model.AttendanceDate.Day, 17, 15, 0);
                        model.AttendanceType    = ATTENDANCE_TYPE.PRESENT;
                        model.ProjectID         = selectedProjectID;
                        model.ProjectName       = (new ServiceProject()).GetProjectDBInfoByID(selectedProjectID).ProjectName;
                        model.Remarks           = "Present";
                        if (listOnSiteATTENDANCE == null)
                        {
                            listOnSiteATTENDANCE = new BindingList <OnSiteAttendanceModel>();
                        }
                        listOnSiteATTENDANCE.Add(model);
                    }
                    listOnSiteATTENDANCE            = AppCommon.ConvertToBindingList <OnSiteAttendanceModel>(listOnSiteATTENDANCE.OrderBy(x => x.EmployeeName).ToList());
                    gridOnSiteAttendance.DataSource = listOnSiteATTENDANCE;
                }
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "PageManualAttendance::btnSelectProject_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            this.Cursor = Cursors.Default;
        }
Exemplo n.º 23
0
 private void PopulatePastSchedules()
 {
     try
     {
         listPastSchedules                                    = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceScheduleCallLog()).GetPastScheduleCallsFor(SOURCE_ENTITY, SOURCE_ENTITY_ID));
         gridPastSchedules.DataSource                         = listPastSchedules;
         gridPastSchedules.Columns["ID"].Visible              = gridPastSchedules.Columns["IsActive"].Visible = gridPastSchedules.Columns["Code"].Visible = gridPastSchedules.Columns["DescriptionToUpper"].Visible = false;
         gridPastSchedules.Columns["Description"].HeaderText  = "History";
         gridPastSchedules.ColumnHeadersDefaultCellStyle.Font = new Font(gridPastSchedules.ColumnHeadersDefaultCellStyle.Font, FontStyle.Bold);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "ctrlScheduleCallLog::PopulatePastSchedules", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 24
0
 private void PopulateItemsGrid()
 {
     try
     {
         _items = AppCommon.ConvertToBindingList <EnquiryBOQItem>((new ServiceInventoryItems()).GetInventoryItemsForMultiselectInBOQ(this.SelectedCategoryID));
         gridItems.DataSource                   = _items;
         gridItems.Columns["ID"].Visible        = false;
         gridItems.Columns["Selected"].Width    = 50;
         headerGroupItems.ValuesPrimary.Heading = string.Format("Select Database Items ({0})", _items.Count);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "frmAddEditBOQDesign::PopulateItemsGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 25
0
 private void PopulateInventoryItemsGrid()
 {
     try
     {
         InventoryItems = AppCommon.ConvertToBindingList <MultiSelectListItem>((new ServiceInventoryItems()).GetInventoryItemsForCategoriesMultiselect(this.SelectedCategoryID));
         gridInventoryItem.DataSource = InventoryItems;
         gridInventoryItem.Columns["EntityType"].Visible   = gridInventoryItem.Columns["ID"].Visible = gridInventoryItem.Columns["DescriptionToUpper"].Visible = false;
         gridInventoryItem.Columns["Code"].Width           = (int)(gridInventoryItem.Width * .10);
         gridInventoryItem.Columns["Selected"].Width       = 50;
         headerGroupInventoryItems.ValuesSecondary.Heading = string.Format("({0}) Items", InventoryItems.Count);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "frmAddEditAssemblyChildItems::PopulateInventoryItemsGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 26
0
 private void btnEditCategory_Click(object sender, EventArgs e)
 {
     try
     {
         frmInventoryCategory frm = new frmInventoryCategory(this.SelectedCategoryID);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             _categoryList = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceInventoryItems()).GetInventoryCategories());
             PopulateInventoryCategories(_categoryList);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "pageInventoryItems::btnEditCategory_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 27
0
 public void PopulateMonthlyPayslipsGrid()
 {
     try
     {
         _PayslipMonthsList      = AppCommon.ConvertToBindingList <PayslipMonthlyListModel>((new ServicePayRoll()).GetDistinctPayslipMonthsList());
         gridPayslips.DataSource = _PayslipMonthsList;
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "PageMyPayslips::PopulateMonthlyPayslipsGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 28
0
 private void PopulateServicesGrid()
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         _services = AppCommon.ConvertToBindingList <EnquiryBOQService>((new ServiceMASTERS()).GetAllServicesMultiSelectinBOQ());
         gridServices.DataSource                   = _services;
         gridServices.Columns["ID"].Visible        = false;
         gridServices.Columns["Selected"].Width    = 50;
         headerGroupServices.ValuesPrimary.Heading = string.Format("Services ({0})", _services.Count);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "frmAddEditBOQDesign::PopulateServicesGrid", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     this.Cursor = Cursors.Default;
 }
Exemplo n.º 29
0
 private void PopulateEmployees()
 {
     try
     {
         _EmployeeList            = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceEmployee()).GetAllActiveEmployeesBetweenDates(dtFromDate.Value, dtToDate.Value));
         gridEmployees.DataSource = _EmployeeList;
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "PageAttendanceGridView::PopulateEmployees", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 30
0
 private void PopulateDepartments()
 {
     try
     {
         _DepartmentsList           = AppCommon.ConvertToBindingList <SelectListItem>((new ServiceMASTERS()).GetAllDepartments());
         gridDepartments.DataSource = _DepartmentsList;
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "PageAttendanceGridView::PopulateDepartments", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }