Example #1
0
        private void OnItemSelectionChange()
        {
            try
            {
                ItemAdditionalInfoControl.SelectedItemID = this.SelectedItemID;
                ItemAdditionalInfoControl.PopulateAdditionalInfo();
                ItemAdditionalInfoControl.Refresh();


                ItemAttachmentControl.SelectedEntityID = this.SelectedItemID;
                ItemAttachmentControl.PopulateDocuments();
                ItemAttachmentControl.Refresh();

                if (tabPageAssembly.Visible)
                {
                    ItemAssemblyControl.ASSEMBLY_ITEM_ID = this.SelectedItemID;
                    ItemAssemblyControl.PopulateParentItems();
                }

                SupplierControl.SelectedItemID = this.SelectedItemID;
                SupplierControl.PopulateItemSuppliers();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "pageInventoryItems::OnItemSelectionChange", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void RefreshTabPage()
        {
            //bool readOnly = (new ServiceSalesQuotation()).IsQuotationReadOnly(this.SelectedQuotationID);
            //if (readOnly)
            //    btnEditQuotation.Enabled = btnDeleteQuotation.Enabled = btnGenerateRevision.Enabled = ButtonEnabled.False;
            //else
            //    btnEditQuotation.Enabled = btnDeleteQuotation.Enabled = btnGenerateRevision.Enabled = ButtonEnabled.True;

            switch (this.SelectedTAB)
            {
            case DB_FORM_IDs.SALES_QUOTATION_REVIEW_ATTACHMENTS:
                if (_ctrlSalesQuotationReviewAttachment == null)
                {
                    return;
                }
                _ctrlSalesQuotationReviewAttachment.SelectedEntityID = this.SelectedQuotationID;
                //_ctrlSalesQuotationReviewAttachment.ReadOnly = readOnly;
                _ctrlSalesQuotationReviewAttachment.PopulateDocuments();
                break;
            }
        }
Example #3
0
        private void RefreshTabPage()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                int  statusID = _UNIT.SalesLeadService.GetLeadStatus(this.SelectedLeadID);
                bool readOnly = false;
                if (statusID == Program.LIST_DEFAULTS[(int)APP_DEFAULT_VALUES.LeadStatusClose].DEFAULT_VALUE)
                {
                    readOnly = true;
                }
                if (statusID == Program.LIST_DEFAULTS[(int)APP_DEFAULT_VALUES.LeadStatusLost].DEFAULT_VALUE)
                {
                    readOnly = true;
                }
                if (statusID == Program.LIST_DEFAULTS[(int)APP_DEFAULT_VALUES.LeadStatusConverted].DEFAULT_VALUE)
                {
                    readOnly = true;
                }

                if (readOnly)
                {
                    btnEditLead.Enabled = btnDeleteLead.Enabled = btnGenerateRevision.Enabled = ButtonEnabled.False;
                }
                else
                {
                    btnEditLead.Enabled = btnDeleteLead.Enabled = btnGenerateRevision.Enabled = ButtonEnabled.True;
                }
                switch (this.SelectedTAB)
                {
                case DB_FORM_IDs.SALES_LEAD_GENERAL_INFO:
                    if (_ctrlGeneralDetails == null)
                    {
                        return;
                    }
                    _ctrlGeneralDetails.SelectedLeadID = this.SelectedLeadID;
                    _ctrlGeneralDetails.ReadOnly       = readOnly;
                    _ctrlGeneralDetails.PopulateLeadMasterInfo();
                    this.SelectedLeadNumber = _ctrlGeneralDetails.lblLeadApprovalInfo.Text;
                    break;

                case DB_FORM_IDs.SALES_LEAD_SUSPECT_INFO:
                    if (_ctrlSuspectInfo == null)
                    {
                        return;
                    }
                    _ctrlSuspectInfo.SelectedID = this.SelectedLeadID;
                    _ctrlSuspectInfo.ReadOnly   = readOnly;
                    _ctrlSuspectInfo.PopulateSuspectInfoControls();
                    break;

                case DB_FORM_IDs.SALES_LEAD_ATTACHMENTS:
                    if (_ctrlSalesLeadAttachment == null)
                    {
                        return;
                    }
                    _ctrlSalesLeadAttachment.SelectedEntityID = this.SelectedLeadID;
                    _ctrlSalesLeadAttachment.ReadOnly         = readOnly;
                    _ctrlSalesLeadAttachment.PopulateDocuments();
                    break;

                case DB_FORM_IDs.SALES_LEAD_SCHEDULE_CALLS:
                    if (_ctrlScheduler == null)
                    {
                        return;
                    }
                    _ctrlScheduler.SOURCE_ENTITY_ID = this.SelectedLeadID;
                    _ctrlScheduler.ReadOnly         = readOnly;
                    _ctrlScheduler.PopulateAllSchedules();
                    break;

                case DB_FORM_IDs.SALES_LEAD_ASSOCIATES:
                    if (_ctrlAssociates == null)
                    {
                        return;
                    }
                    _ctrlAssociates.SelectedID = this.SelectedLeadID;
                    _ctrlAssociates.ReadOnly   = readOnly;
                    _ctrlAssociates.PopulateAssociatedEmployees();
                    break;
                }
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "pageSalesLead::RefreshTabPage", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            this.Cursor = Cursors.Default;
        }
        private void RefreshTabPage()
        {
            bool readOnly = (new ServiceSalesQuotation()).IsQuotationReadOnly(this.SelectedQuotationID);

            if (readOnly)
            {
                btnEditQuotation.Enabled = btnDeleteQuotation.Enabled = btnGenerateRevision.Enabled = ButtonEnabled.False;
            }
            else
            {
                btnEditQuotation.Enabled = btnDeleteQuotation.Enabled = btnGenerateRevision.Enabled = ButtonEnabled.True;
            }

            switch (this.SelectedTAB)
            {
            case DB_FORM_IDs.SALES_QUOTATION_GENERAL_INFO:
                if (_ctrlGeneralDetails == null)
                {
                    return;
                }
                _ctrlGeneralDetails.SelectedQuotationID = this.SelectedQuotationID;
                _ctrlGeneralDetails.ReadOnly            = readOnly;
                _ctrlGeneralDetails.PoulateSalesQuotationMasterInfo();

                break;

            case DB_FORM_IDs.SALES_QUOTATION_CLIENT_INFO:
                if (_ctrlClientDetails == null)
                {
                    return;
                }
                _ctrlClientDetails.SelectedQuotationID = this.SelectedQuotationID;
                _ctrlClientDetails.ReadOnly            = readOnly;
                _ctrlClientDetails.PopulateClientAndConsultantInfo(); break;

            //case DB_FORM_IDs.SALES_QUOTATION_BOQ:
            //    if (_ControlQuotationBOQ == null) return;
            //    _ControlQuotationBOQ.SalesQuotationID = this.SelectedQuotationID;
            //    _ControlQuotationBOQ.ReadOnly = readOnly;
            //    _ControlQuotationBOQ.PopulateSalesQuotationBOQ();
            //    if (_ctrlGeneralDetails != null)
            //        _ctrlGeneralDetails.UpdateBOQSummary(_ControlQuotationBOQ.MODEL.SUMMARY);
            //    break;
            case DB_FORM_IDs.SALES_QUOTATION_ATTACHMENTS:
                if (_ctrlAttachment == null)
                {
                    return;
                }
                _ctrlAttachment.SelectedEntityID = this.SelectedQuotationID;
                _ctrlAttachment.ReadOnly         = readOnly;
                _ctrlAttachment.PopulateDocuments();
                break;

            case DB_FORM_IDs.SALES_QUOTATION_SCHEDULE_CALL:
                if (_ctrlScheduler == null)
                {
                    return;
                }
                _ctrlScheduler.SOURCE_ENTITY_ID = this.SelectedQuotationID;
                _ctrlScheduler.ReadOnly         = readOnly;
                _ctrlScheduler.PopulateAllSchedules();
                break;

            case DB_FORM_IDs.SALES_QUOTATION_ASSOCIATES:
                if (_ctrlAssociates == null)
                {
                    return;
                }
                _ctrlAssociates.SelectedID = this.SelectedQuotationID;
                _ctrlAssociates.ReadOnly   = readOnly;
                _ctrlAssociates.PopulateAssociatedEmployees();
                break;

            case DB_FORM_IDs.SALES_QUOTATION_TNC:
                if (_ctrlTermsAndConditions == null)
                {
                    return;
                }
                _ctrlTermsAndConditions.SelectedQuotationID = this.SelectedQuotationID;
                _ctrlTermsAndConditions.ReadOnly            = readOnly;
                _ctrlTermsAndConditions.PopulateControl();
                break;
            }
        }
Example #5
0
        private void RefreshTabPage()
        {
            switch (this.SelectedTAB)
            {
            case DB_FORM_IDs.EMPLOYEE_GENERAL_INFO:
                if (_EmployeeGeneralInfoControl == null)
                {
                    return;
                }
                _EmployeeGeneralInfoControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeeGeneralInfoControl.PopulateEmployeeGeneralAndResignationInfo();
                break;

            case DB_FORM_IDs.EMPLOYEE_PERSONAL_DETAILS:
                if (_EmployeePersonalInfoControl == null)
                {
                    return;
                }
                _EmployeePersonalInfoControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeePersonalInfoControl.PopulateEmployeePersonalAndFamilyInfo();
                break;

            case DB_FORM_IDs.EMPLOYEE_BANK_DETAILS:
                if (_EmployeeBankInfoControl == null)
                {
                    return;
                }
                _EmployeeBankInfoControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeeBankInfoControl.PopulateEmployeeBankInfo();
                break;

            case DB_FORM_IDs.EMPLOYEE_ATTACHMENT:
                if (_ctrlAttachment == null)
                {
                    return;
                }
                _ctrlAttachment.SelectedEntityID = this.SelectedEmployeeID;
                _ctrlAttachment.PopulateDocuments();
                break;

            case DB_FORM_IDs.EMPLOYEE_OTHER_DETAIL:
                if (_EmployeeOtherInfoControl == null)
                {
                    return;
                }
                _EmployeeOtherInfoControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeeOtherInfoControl.PopulateEmployeeQualificationAndLastEmployerInfo();
                break;

            case DB_FORM_IDs.EMPLOYEE_ADDITIONAL_DETAILS:
                if (_EmployeeAdditionalDetailControl == null)
                {
                    return;
                }
                _EmployeeAdditionalDetailControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeeAdditionalDetailControl.PopulateAdditonalInfo();
                break;

            case DB_FORM_IDs.EMPLOYEE_LEAVE_CONFIGURATION:
                if (_EmployeeLeaveConfigControl == null)
                {
                    return;
                }
                _EmployeeLeaveConfigControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeeLeaveConfigControl.PopulateEmployeeLeaveConfigurations();
                break;

            case DB_FORM_IDs.EMPLOYEE_CTC_INFO:
                if (_EmployeeCTCControl == null)
                {
                    return;
                }
                _EmployeeCTCControl.SelectedEmployeeID = this.SelectedEmployeeID;
                _EmployeeCTCControl.PopulateAllouncesAndDeductionCTCGrid();
                break;

            case DB_FORM_IDs.EMPLOYEE_AUTHORITIES:
                if (_EmployeeAuthoritiesControl == null)
                {
                    return;
                }
                _EmployeeAuthoritiesControl.EmployeeID = this.SelectedEmployeeID;
                _EmployeeAuthoritiesControl.PopulateAuthoritiesForEmployee();
                break;
            }
        }
Example #6
0
        private void RefreshTabPage()
        {
            bool readOnly = !(new ServiceSalesEnquiry()).IsEnquiryStatusOPEN(this.SelectedEnquiryID);

            if (readOnly)
            {
                btnEditEnquiry.Enabled = btnDeleteEnquiry.Enabled = btnGenerateRevision.Enabled = btnShowBOQ.Enabled = ButtonEnabled.False;
            }
            else
            {
                btnEditEnquiry.Enabled = btnDeleteEnquiry.Enabled = btnGenerateRevision.Enabled = btnShowBOQ.Enabled = ButtonEnabled.True;
            }
            switch (this.SelectedTAB)
            {
            case DB_FORM_IDs.SALES_ENQUIRY_GENERAL_INFO:
                if (_ctrlGeneralDetails == null)
                {
                    return;
                }
                _ctrlGeneralDetails.SelectedEnquiryID = this.SelectedEnquiryID;
                _ctrlGeneralDetails.ReadOnly          = readOnly;
                _ctrlGeneralDetails.PoulateEnquiryMasterInfo();
                break;

            case DB_FORM_IDs.SALES_ENQUIRY_CLIENT_INFO:
                if (_ctrlClientDetails == null)
                {
                    return;
                }
                _ctrlClientDetails.SelectedEnquiryID = this.SelectedEnquiryID;
                _ctrlClientDetails.ReadOnly          = readOnly;
                _ctrlClientDetails.PopulateClientAndConsultantInfo(); break;

            case DB_FORM_IDs.SALES_ENQUIRY_ATTACHMENTS:
                if (_ctrlAttachment == null)
                {
                    return;
                }
                _ctrlAttachment.SelectedEntityID = this.SelectedEnquiryID;
                _ctrlAttachment.ReadOnly         = readOnly;
                _ctrlAttachment.PopulateDocuments();
                break;

            case DB_FORM_IDs.SALES_ENQUIRY_SCHEDULE_CALL:
                if (_ctrlScheduler == null)
                {
                    return;
                }
                _ctrlScheduler.SOURCE_ENTITY_ID = this.SelectedEnquiryID;
                _ctrlScheduler.ReadOnly         = readOnly;
                _ctrlScheduler.PopulateAllSchedules();
                break;

            case DB_FORM_IDs.SALES_ENQUIRY_ASSOCIATES:
                if (_ctrlAssociates == null)
                {
                    return;
                }
                _ctrlAssociates.SelectedID = this.SelectedEnquiryID;
                _ctrlAssociates.ReadOnly   = readOnly;
                _ctrlAssociates.PopulateAssociatedEmployees();
                break;
            }
        }
Example #7
0
        private void RefreshTabPage()
        {
            bool readOnly = _service.IsSalesOrderReadOnly(this.SelectedOrderID);

            if (readOnly)
            {
                btnAddPrimarySO.Enabled = btnAddWithoutOrderSO.Enabled = btnEditOrder.Enabled = btnDeleteOrder.Enabled = ButtonEnabled.False;
            }
            else
            {
                btnAddPrimarySO.Enabled = btnAddWithoutOrderSO.Enabled = btnEditOrder.Enabled = btnDeleteOrder.Enabled = ButtonEnabled.True;
            }

            switch (this.SelectedTAB)
            {
            case DB_FORM_IDs.SALES_ORDER_GENERAL_INFO:
                if (_ctrlGeneralDetails == null)
                {
                    return;
                }
                _ctrlGeneralDetails.SelectedSalesOrderID = this.SelectedOrderID;
                _ctrlGeneralDetails.ReadOnly             = readOnly;
                _ctrlGeneralDetails.PopulateSalesOrderGeneralInfo();
                break;

            case DB_FORM_IDs.SALES_ORDER_CLIENT_CONTACT:
                if (_ctrlContactDetails == null)
                {
                    return;
                }
                _ctrlContactDetails.SelectedSalesOrderID = this.SelectedOrderID;
                _ctrlContactDetails.ReadOnly             = readOnly;
                _ctrlContactDetails.PopulateClientInfo();
                break;

            case DB_FORM_IDs.SALES_ORDER_ATTACHMENTS:
                if (_ctrlAttachment == null)
                {
                    return;
                }
                _ctrlAttachment.SelectedEntityID = this.SelectedOrderID;
                _ctrlAttachment.PopulateDocuments();
                break;

            case DB_FORM_IDs.SALES_ORDER_ASSOCIATES:
                if (_ctrlAssociates == null)
                {
                    return;
                }
                _ctrlAssociates.SelectedID = this.SelectedOrderID;
                _ctrlAssociates.ReadOnly   = readOnly;
                _ctrlAssociates.PopulateAssociatedEmployees();
                break;

            case DB_FORM_IDs.SALES_ORDER_SCHEDULE_CALL:
                if (_ctrlScheduler == null)
                {
                    return;
                }
                _ctrlScheduler.SOURCE_ENTITY_ID = this.SelectedOrderID;
                _ctrlScheduler.ReadOnly         = readOnly;
                _ctrlScheduler.PopulateAllSchedules();
                break;

            case DB_FORM_IDs.SALES_ORDER_TNC:
                if (_ctrlTermsAndCondition == null)
                {
                    return;
                }
                _ctrlTermsAndCondition.SelectedOrderID = this.SelectedOrderID;
                _ctrlTermsAndCondition.ReadOnly        = readOnly;
                _ctrlTermsAndCondition.PopulateTermsAndConditions();
                break;
            }
        }
Example #8
0
        private void PageMyPersoanlInfo_Load(object sender, EventArgs e)
        {
            try
            {
                // GENERAL INFO CONTROL
                _controlGeneralInfo = new ControlEmployeeGeneralInfo();
                _controlGeneralInfo.SelectedEmployeeID = Program.CURR_USER.EmployeeID;
                tabPageGeneralInfo.Controls.Add(_controlGeneralInfo);
                _controlGeneralInfo.Dock = DockStyle.Fill;
                _controlGeneralInfo.PopulateEmployeeGeneralAndResignationInfo();
                _controlGeneralInfo.SetReadOnly();

                // PERSONAL INFO CONTROL
                _controlPersonalInfo = new ControlEmployeePersonalInfo();
                _controlPersonalInfo.SelectedEmployeeID = Program.CURR_USER.EmployeeID;
                tabPagePersonalInfo.Controls.Add(_controlPersonalInfo);
                _controlPersonalInfo.Dock = DockStyle.Fill;
                _controlPersonalInfo.PopulateEmployeePersonalAndFamilyInfo();
                _controlPersonalInfo.SetReadOnly();

                // BANK INFO
                _controlBankInfo = new ControlEmployeeBankInfo();
                _controlBankInfo.SelectedEmployeeID = Program.CURR_USER.EmployeeID;
                tabPageBankInfo.Controls.Add(_controlBankInfo);
                _controlBankInfo.Dock = DockStyle.Fill;
                _controlBankInfo.PopulateEmployeeBankInfo();
                _controlBankInfo.SetReadOnly();

                // ATTACHMENT INFO.
                _ctrlAttachment = new ctrlAttachments(APP_ENTITIES.EMPLOYEES);
                _ctrlAttachment.CONTROL_ORIENTATION = Orientation.Vertical;
                tabPageAttachmentInfo.Controls.Add(_ctrlAttachment);
                _ctrlAttachment.Dock             = DockStyle.Fill;
                _ctrlAttachment.SelectedEntityID = Program.CURR_USER.EmployeeID;
                _ctrlAttachment.PopulateDocuments();
                _ctrlAttachment.SetReadOnly();

                // OTHER INFO - ATION AND WORK EXPERIENCE
                _controlOtherInfo = new ControlEmployeeOtherInfo();
                tabPageOtherInfo.Controls.Clear();
                tabPageOtherInfo.Controls.Add(_controlOtherInfo);
                _controlOtherInfo.Dock = DockStyle.Fill;
                _controlOtherInfo.PopulateEmployeeQualificationAndLastEmployerInfo();
                _controlOtherInfo.SetReadOnly();

                // ADDITIONAL INFO
                _controlAdditionalInfo = new ControlEmployeeAdditionalInfo();
                tabPageAdditionalInfo.Controls.Clear();
                tabPageAdditionalInfo.Controls.Add(_controlAdditionalInfo);
                _controlAdditionalInfo.Dock = DockStyle.Fill;
                _controlAdditionalInfo.SelectedEmployeeID = Program.CURR_USER.EmployeeID;
                _controlAdditionalInfo.PopulateAdditonalInfo();
                _controlAdditionalInfo.SetReadOnly();

                // LEAVE INFO
                _ControlLeaveInfo = new ControlEmployeeLeaveConfig();
                tabPageLeaveInfo.Controls.Clear();
                tabPageLeaveInfo.Controls.Add(_ControlLeaveInfo);
                _ControlLeaveInfo.Dock = DockStyle.Fill;
                _ControlLeaveInfo.SelectedEmployeeID = Program.CURR_USER.EmployeeID;
                _ControlLeaveInfo.PopulateEmployeeLeaveConfigurations();
                _ControlLeaveInfo.SetReadOnly();

                //CTC INFO
                _ControlCTCInfo = new ControlEmployeeCTC();
                tabPageCtcInfo.Controls.Clear();
                tabPageCtcInfo.Controls.Add(_ControlCTCInfo);
                _ControlCTCInfo.Dock = DockStyle.Fill;
                _ControlCTCInfo.SelectedEmployeeID = Program.CURR_USER.EmployeeID;
                _ControlCTCInfo.PopulateAllouncesAndDeductionCTCGrid();
                _ControlCTCInfo.SetReadOnly();
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "ControlEmployeeAuthorities::PageMyPersoanlInfo_Load", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }