Beispiel #1
0
        private void BindDetails()
        {
            cmbStatus.DataSource    = OfficialBusiness.DdlDsStatus();
            cmbStatus.ValueMember   = "pvalue";
            cmbStatus.DisplayMember = "ptext";

            cmbRStatus.DataSource    = OfficialBusiness.DdlDsStatusApprover();
            cmbRStatus.ValueMember   = "pvalue";
            cmbRStatus.DisplayMember = "ptext";

            cmbHStatus.DataSource    = OfficialBusiness.DdlDsStatusApprover();
            cmbHStatus.ValueMember   = "pvalue";
            cmbHStatus.DisplayMember = "ptext";

            txtOBCode.Text = _strOBCode;
            using (OfficialBusiness objOfficialBusiness = new OfficialBusiness())
            {
                objOfficialBusiness.OBCode = _strOBCode;
                objOfficialBusiness.Fill();
                txtRequestor.Text = Employee.GetName(objOfficialBusiness.UserName);
                _strOBType        = objOfficialBusiness.OBType;
                txtOBtype.Text    = OfficialBusiness.GetOBTypeDesc(objOfficialBusiness.OBType);
                txtRenderTo.Text  = Department.GetName(objOfficialBusiness.DepartmentCode);
                dtpFileDate.Value = objOfficialBusiness.DateFile;
                dtpFileTime.Value = objOfficialBusiness.DateFile;
                txtReason.Text    = objOfficialBusiness.Reason;
                if (objOfficialBusiness.OBType == "1")
                {
                    txtRApprover.Text        = Employee.GetName(objOfficialBusiness.RAName);
                    dtpRDate.Value           = objOfficialBusiness.RADate;
                    dtpRTime.Value           = objOfficialBusiness.RADate;
                    cmbRStatus.SelectedValue = objOfficialBusiness.RAStatus;
                    txtRRemarks.Text         = objOfficialBusiness.RARemarks;
                }
                else
                {
                    txtRApprover.Visible = false;
                    dtpRDate.Visible     = false;
                    dtpRTime.Visible     = false;
                    cmbRStatus.Visible   = false;
                    txtRRemarks.Visible  = false;
                    lblRApprover.Visible = false;
                    lblRStatus.Visible   = false;
                    lblRRemarks.Visible  = false;
                }
                txtHApprover.Text        = Employee.GetName(objOfficialBusiness.HAName);
                dtpHDate.Value           = objOfficialBusiness.HADate;
                dtpHTime.Value           = objOfficialBusiness.HADate;
                cmbHStatus.SelectedValue = objOfficialBusiness.HAStatus;
                txtHRemarks.Text         = objOfficialBusiness.HARemarks;
                cmbStatus.SelectedValue  = objOfficialBusiness.Status;
            }
            LoadOBDetails();
        }
Beispiel #2
0
        private void InitializeFields()
        {
            OB_Code();

            dtpFileDate.Value = DateTime.Now;
            dtpFileTime.Value = DateTime.Now;
            dtpRDate.Value    = DateTime.Now;
            dtpRTime.Value    = DateTime.Now;
            dtpHDate.Value    = DateTime.Now;
            dtpHTime.Value    = DateTime.Now;
            txtReason.Text    = "";
            txtRRemarks.Text  = "";
            txtHRemarks.Text  = "";

            cmbStatus.DataSource    = OfficialBusiness.DdlDsStatus();
            cmbStatus.ValueMember   = "pvalue";
            cmbStatus.DisplayMember = "ptext";

            cmbRequestor.DataSource    = Employee.DSLActive();
            cmbRequestor.ValueMember   = "pvalue";
            cmbRequestor.DisplayMember = "ptext";

            _strDepartmentCode = Employee.GetDepartmentCode(cmbRequestor.SelectedValue.ToString());

            cmbOBType.DataSource    = OfficialBusiness.DdlDsOBType();
            cmbOBType.ValueMember   = "pvalue";
            cmbOBType.DisplayMember = "ptext";

            cmbRender.DataSource    = Department.GetDSL();
            cmbRender.ValueMember   = "pvalue";
            cmbRender.DisplayMember = "ptext";

            cmbRStatus.DataSource    = OfficialBusiness.DdlDsStatusApprover();
            cmbRStatus.ValueMember   = "pvalue";
            cmbRStatus.DisplayMember = "ptext";

            cmbHStatus.DataSource    = OfficialBusiness.DdlDsStatusApprover();
            cmbHStatus.ValueMember   = "pvalue";
            cmbHStatus.DisplayMember = "ptext";

            BindApprovers();

            CheckRender();
        }
Beispiel #3
0
        private void BindDetails()
        {
            cmbStatus.DataSource    = OfficialBusiness.DdlDsStatus();
            cmbStatus.ValueMember   = "pvalue";
            cmbStatus.DisplayMember = "ptext";

            cmbRStatus.DataSource    = OfficialBusiness.DdlDsStatusApprover();
            cmbRStatus.ValueMember   = "pvalue";
            cmbRStatus.DisplayMember = "ptext";

            cmbHStatus.DataSource    = OfficialBusiness.DdlDsStatusApprover();
            cmbHStatus.ValueMember   = "pvalue";
            cmbHStatus.DisplayMember = "ptext";

            txtOvertimeCode.Text = _strOvertimeCode;
            using (clsOvertime overtime = new clsOvertime())
            {
                overtime.OvertimeCode = _strOvertimeCode;
                overtime.Fill();
                txtRequestor.Text  = Employee.GetName(overtime.Username);
                _strChargeType     = overtime.ChargeType;
                txtChargeType.Text = clsOvertime.GetChargeTypeDesc(overtime.ChargeType);
                txtRenderedTo.Text = Department.GetName(overtime.DepartmentCode);
                dtpFileDate.Value  = overtime.DateFile;
                dtpFileTime.Value  = overtime.DateFile;
                dtpStartDate.Value = overtime.DateStart;
                dtpStartTime.Value = overtime.DateStart;
                dtpEndDate.Value   = overtime.DateEnd;
                dtpEndTime.Value   = overtime.DateEnd;
                txtReason.Text     = overtime.Reason;
                if (overtime.ChargeType == "1")
                {
                    txtRApprover.Text        = Employee.GetName(overtime.RequestorApproverName);
                    dtpRDate.Value           = overtime.RequestorApproverDate;
                    dtpRTime.Value           = overtime.RequestorApproverDate;
                    cmbRStatus.SelectedValue = overtime.RequestorApproverStatus;
                    txtRRemarks.Text         = overtime.RequestorApproverRemarks;
                    dtpRDate.Checked         = (overtime.RequestorApproverDate != clsDateTime.SystemMinDate);
                    dtpRTime.Checked         = (overtime.RequestorApproverDate != clsDateTime.SystemMinDate);
                }
                else
                {
                    txtRApprover.Visible = false;
                    dtpRDate.Visible     = false;
                    dtpRTime.Visible     = false;
                    cmbRStatus.Visible   = false;
                    txtRRemarks.Visible  = false;
                    lblRApprover.Visible = false;
                    lblRStatus.Visible   = false;
                    lblRRemarks.Visible  = false;
                }
                txtHApprover.Text        = Employee.GetName(overtime.HeadApproverName);
                dtpHDate.Value           = overtime.HeadApproverDate;
                dtpHTime.Value           = overtime.HeadApproverDate;
                cmbHStatus.SelectedValue = overtime.HeadApproverStatus;
                txtHRemarks.Text         = overtime.HeadApproverRemarks;
                cmbStatus.SelectedValue  = overtime.Status;

                dtpHDate.Checked = (overtime.HeadApproverDate != clsDateTime.SystemMinDate);
                dtpHTime.Checked = (overtime.HeadApproverDate != clsDateTime.SystemMinDate);
            }
        }