private void GetAppraisalHeader() { AppraisalDocHeader_Manage manage = new AppraisalDocHeader_Manage(); AppraisalDocHeader docHead = new AppraisalDocHeader(); docHead = manage.GetData(hdfEmployeeID.Value.Trim(), DateTime.Now.Year); if (docHead != null) { lblDocNo.Text = docHead.AppraisalDocNo; hdfAppraisalDocNo.Value = docHead.AppraisalDocNo; hdfAppraisalStatus.Value = string.IsNullOrEmpty(docHead.AppraisalStatus) ? "" : docHead.AppraisalStatus.Trim(); lblApprovalStatus.Text = hdfAppraisalStatus.Value.Trim(); if (docHead.AppraisalPeriodFrom != null) { lblDateFrom.Text = docHead.AppraisalPeriodFrom.Value.ToString(@"dd\/MM\/yyyy"); } if (docHead.AppraisalPeriodTo != null) { lblDateTo.Text = docHead.AppraisalPeriodTo.Value.ToString(@"dd\/MM\/yyyy"); } } else { lblDocNo.Text = string.Empty; } }
private void GetAppraisalHeader() { if (!string.IsNullOrEmpty(hdfPerformanceYear.Value.Trim())) { int _year = int.Parse(hdfPerformanceYear.Value.Trim()); AppraisalDocHeader_Manage manage = new AppraisalDocHeader_Manage(); AppraisalDocHeader docHead = new AppraisalDocHeader(); docHead = manage.GetData(hdfEmployeeID.Value.Trim(), _year); if (docHead != null) { lblAppraisalDocNo.Text = docHead.AppraisalDocNo; hdfAppraisalDocNo.Value = docHead.AppraisalDocNo; txtEmpStrength.Text = docHead.EmployeeStrength.Trim(); txtEmpImpovement.Text = docHead.EmployeeImprovement.Trim(); } else { lblAppraisalDocNo.Text = "(Creator)"; } lblResultScore.Text = string.IsNullOrEmpty(docHead.AppraisalGrade) ? "" : "Band " + docHead.AppraisalGrade; if (docHead.AppraisalPeriodFrom != null) { lblDateFrom.Text = docHead.AppraisalPeriodFrom.Value.ToString(@"dd\/MM\/yyyy"); } if (docHead.AppraisalPeriodTo != null) { lblDateTo.Text = docHead.AppraisalPeriodTo.Value.ToString(@"dd\/MM\/yyyy"); } } }
private void GetAppraisalHeader() { AppraisalDocHeader_Manage manage = new AppraisalDocHeader_Manage(); AppraisalDocHeader docHead = new AppraisalDocHeader(); docHead = manage.GetData(hdfEmployeeID.Value.Trim(), DateTime.Now.Year); if (docHead != null) { //**** For Check Duplicate Job ****// if (docHead.AppraisalStatus.Trim().ToLower().Equals("completed")) { btnSubmit.Visible = false; btnReject.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { if (docHead.AppraisalStatus.Trim().Equals("Rejected")) { ActionHistory_Manage hm = new ActionHistory_Manage(); string _staus = hm.GetActionHistoryStatus(hdfAppraisalDocNo.Value.Trim(), "SecondManager"); if (string.IsNullOrEmpty(_staus)) { btnSubmit.Visible = false; btnReject.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { btnSubmit.Visible = true; btnReject.Visible = true; } } else { btnSubmit.Visible = true; btnReject.Visible = true; } } //*******************************// lblAppraisalDocNo.Text = docHead.AppraisalDocNo; hdfAppraisalDocNo.Value = docHead.AppraisalDocNo; txtEmpStrength.Text = docHead.EmployeeStrength.Trim(); txtEmpImpovement.Text = docHead.EmployeeImprovement.Trim(); if (docHead.AppraisalPeriodFrom != null) { lblDateFrom.Text = docHead.AppraisalPeriodFrom.Value.ToString(@"dd\/MM\/yyyy"); } if (docHead.AppraisalPeriodTo != null) { lblDateTo.Text = docHead.AppraisalPeriodTo.Value.ToString(@"dd\/MM\/yyyy"); } lblResultScore.Text = string.IsNullOrEmpty(docHead.AppraisalGrade) ? "" : "Band " + docHead.AppraisalGrade.Trim(); } else { lblAppraisalDocNo.Text = "(Creator)"; //********** Check case click link from old email ***// btnSubmit.Visible = false; btnReject.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); //***************************************************// } }
private void GetAppraisalHeader() { try { AppraisalDocHeader_Manage manage = new AppraisalDocHeader_Manage(); AppraisalDocHeader docHead = new AppraisalDocHeader(); docHead = manage.GetData(hdfEmployeeID.Value.Trim(), DateTime.Now.Year); if (docHead != null) { hdfAppraisalDocNo.Value = string.IsNullOrEmpty(docHead.AppraisalDocNo) ? "" : docHead.AppraisalDocNo.Trim(); hdfStatus.Value = string.IsNullOrEmpty(docHead.AppraisalStatus) ? "" : docHead.AppraisalStatus.Trim(); lblAppraisalDocNo.Text = hdfAppraisalDocNo.Value.Trim(); string _EmployeeType = hdfEmployeeType.Value.Trim(); //********************************************************** if (docHead.AppraisalPeriodFrom != null) { lblDateFrom.Text = docHead.AppraisalPeriodFrom.Value.ToString(@"dd\/MM\/yyyy"); } else { if (_EmployeeType.Equals("1")) { lblDateFrom.Text = "01/01/" + DateTime.Now.Year.ToString(); } else { lblDateFrom.Text = lblContractStart.Text.Trim(); } } if (docHead.AppraisalPeriodTo != null) { lblDateTo.Text = docHead.AppraisalPeriodTo.Value.ToString(@"dd\/MM\/yyyy"); } else { if (_EmployeeType.Equals("1")) { lblDateTo.Text = "31/12/" + DateTime.Now.Year.ToString(); } else { lblDateTo.Text = lblContractEnd.Text.Trim(); } } //******************************************************** txtEmpStrength.Text = docHead.EmployeeStrength; txtEmpImpovement.Text = docHead.EmployeeImprovement; lblResultScore.Text = string.IsNullOrEmpty(docHead.AppraisalGrade) ? "" : "Band " + docHead.AppraisalGrade; if (docHead.AppraisalStatus.Trim().ToLower().Equals("completed")) { btnSubmit.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { if (docHead.AppraisalStatus.Trim().Equals("Waiting 2nd Manager Approve")) { ActionHistory_Manage hm = new ActionHistory_Manage(); string _staus = hm.GetActionHistoryStatus(hdfAppraisalDocNo.Value.Trim(), "FirstManager"); if (!string.IsNullOrEmpty(_staus) && _staus.Trim().Equals("Approved")) { btnSubmit.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { btnSubmit.Visible = true; } } } } else { btnSubmit.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); } }
private void GetAppraisalHeader() { try { AppraisalDocHeader_Manage manage = new AppraisalDocHeader_Manage(); AppraisalDocHeader docHead = new AppraisalDocHeader(); docHead = manage.GetData(hdfEmployeeID.Value.Trim(), DateTime.Now.Year); if (docHead != null) { string _DocNo = string.IsNullOrEmpty(docHead.AppraisalDocNo) ? "" : docHead.AppraisalDocNo.Trim(); hdfAppraisalDocNo.Value = _DocNo; //**** For Check Duplicate Job ****// if (!string.IsNullOrEmpty(_DocNo)) { if (docHead.AppraisalStatus.ToLower().Trim().Equals("completed")) { btnSubmit.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { if (docHead.AppraisalStatus.Trim().Equals("Waiting 2nd Manager Approve")) { ActionHistory_Manage hm = new ActionHistory_Manage(); string _staus = hm.GetActionHistoryStatus(hdfAppraisalDocNo.Value.Trim(), "FirstManager"); if (!string.IsNullOrEmpty(_staus) && _staus.Trim().Equals("Approved")) { btnSubmit.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { btnSubmit.Visible = true; } } else if (docHead.AppraisalStatus.Trim().Equals("Rejected")) { ActionHistory_Manage hm = new ActionHistory_Manage(); string _staus = hm.GetActionHistoryStatus(hdfAppraisalDocNo.Value.Trim(), "SecondManager"); if (string.IsNullOrEmpty(_staus)) { btnSubmit.Visible = false; lbtnPopupErr_ModalPopupExtender.Show(); } else { btnSubmit.Visible = true; } } else { btnSubmit.Visible = true; } } } //*******************************// } } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); } }