protected void divReleasebtnOk_Click(object sender, EventArgs e) { int rowscount = gvRelease.Rows.Count; for (int i = 0; i < rowscount; i++) { CheckBox chk = (CheckBox)gvRelease.Rows[i].FindControl("chkRelease"); Label lblmonth = (Label)gvRelease.Rows[i].FindControl("lblMonthNumber"); Label lblyear = (Label)gvRelease.Rows[i].FindControl("lblReleaseYear"); if (chk.Checked) { BLL_SCM_Report.SCMReportRealeaseResponseToShip(Convert.ToInt32(Session["userid"].ToString()), Convert.ToInt32(lblyear.Text), Convert.ToInt32(lblmonth.Text)); } } string msgDivReleaseHide = string.Format("hideModal('divRelease');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgDivReleaseHide", msgDivReleaseHide, true); BindSCMResponseSearch(); UpdPnlFilter.Update(); UpdPnlGrid.Update(); }
protected void btnClearFilter_Click(object sender, EventArgs e) { ViewState["OverDueSearchFlage"] = null; ViewState["SORTDIRECTION"] = null; ViewState["SORTBYCOLOUMN"] = null; ViewState["ucfJobIDFilterType"] = null; ViewState["Jobid"] = null; DDLFleet.SelectedValue = "0"; BindVesselDDL(); txtFromDate.Text = ""; txtToDate.Text = ""; txtActFrmDate.Text = ""; txtActToDate.Text = ""; DDLVessel.ClearSelection(); ddlFunction.ClearSelection(); chkCMS.Checked = false; chkCritical.Checked = false; chkAdvSafetyAlarm.Checked = false; chkAdvCalibration.Checked = false; ddlSystem_location.ClearSelection(); ucf_DDLRank.ClearSelection(); ddlSubSystem_location.ClearSelection(); // rbtDueType.SelectedValue = "0"; rbtDueType.Items[0].Selected = true; rbtDueType.Items[1].Selected = true; rbtnJobTypes.SelectedValue = "PMS"; txtSearchJobTitle.Text = ""; txtFromDate.Enabled = false; txtToDate.Enabled = false; rbtnMRA.SelectedValue = "ALL"; rbtnRASubmitted.SelectedValue = "ALL"; BindJobStatus(); UpdPnlFilter.Update(); UpdPnlGrid.Update(); UpdAdvFltr.Update(); if (hfAdv.Value == "o") { String tgladvsearchClr = String.Format("toggleOnSearchClearFilter(advText,'" + hfAdv.Value + "');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "tgladvsearchClr", tgladvsearchClr, true); } else { String tgladvsearchClr1 = String.Format("toggleOnSearchClearFilter(advText,'" + hfAdv.Value + "');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "tgladvsearchClr1", tgladvsearchClr1, true); } }
protected void divResponsebtnResponse_Click(object sender, EventArgs e) { BLL_SCM_Report.SCMReportOfficeResponseSave(Convert.ToInt32(Session["userid"].ToString()), Convert.ToInt32(ViewState["ResponseID"].ToString()), divResponsetxtOfficeResponse.Text); string msgDivResponseHide = string.Format("hideModal('divResponse');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgDivResponseHide", msgDivResponseHide, true); BindSCMResponseSearch(); UpdPnlFilter.Update(); UpdPnlGrid.Update(); }
/// <summary> /// Event is use to call function that retrive forms details according to vessels assigned to login user. /// </summary> protected void chkVesselAssign_CheckedChanged(object sender, EventArgs e) { try { BindVesselDDL(); UpdPnlFilter.Update(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
/// <summary> /// Bind all vetting Questionnaire /// </summary> public void BindQuestionnaire() { try { BLL_VET_Questionnaire objBLLQuest = new BLL_VET_Questionnaire(); DataSet ds = new DataSet(); int rowcount = ucCustomPagerItems.isCountRecord; string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString()); int? sortdirection = null; if (ViewState["SORTDIRECTION"] != null) { sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } ds = objBLLQuest.VET_Get_Questionnaire(UDFLib.ConvertIntegerToNull(DDLModule.SelectedValue), DDLVeseelType.SelectedValues, DDLVetType.SelectedValues, DDLStatus.SelectedValues, txtNumber.Text != "" ? txtNumber.Text.Trim() : null, txtVersion.Text != "" ? txtVersion.Text.Trim() : null, txtQuestionnaire.Text != "" ? txtQuestionnaire.Text.Trim() : null, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount); if (ucCustomPagerItems.isCountRecord == 1) { ucCustomPagerItems.CountTotalRec = rowcount.ToString(); ucCustomPagerItems.BuildPager(); } gvQuestionnaire.DataSource = ds.Tables[0]; gvQuestionnaire.DataBind(); if (ds.Tables[0].Rows.Count > 0) { btnExport.Enabled = true; } else { btnExport.Enabled = false; } UpdPnlGrid.Update(); UpdPnlFilter.Update(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
protected void divResponsebtnModifyDept_Click(object sender, EventArgs e) { int?deptid = null; if (DivResponseDDLDeptpartment.SelectedValue != "0") { deptid = Convert.ToInt32(DivResponseDDLDeptpartment.SelectedValue.ToString()); } BLL_SCM_Report.SCMReportOfficeDepartmentUpdate(Convert.ToInt32(Session["userid"].ToString()), Convert.ToInt32(ViewState["ResponseID"].ToString()), deptid); string msgDivResponseHide = string.Format("hideModal('divResponse');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgDivResponseHide", msgDivResponseHide, true); BindSCMResponseSearch(); UpdPnlFilter.Update(); UpdPnlGrid.Update(); }
/// <summary> /// Function to Bind Job Status to grid /// </summary> public void BindJobStatus() { try { BLL_PMS_Job_Status objJobStatus = new BLL_PMS_Job_Status(); DataSet ds = new DataSet(); BLL_Infra_VesselLib objVsl = new BLL_Infra_VesselLib(); int rowcount = ucCustomPagerItems.isCountRecord; int odjobcount = 1; int critodjobcount = 1; int totaljobcount = 1; string vesselcode = (ViewState["VesselCode"] == null) ? null : (ViewState["VesselCode"].ToString()); string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString()); int? sortdirection = null; if (ViewState["SORTDIRECTION"] != null) { sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } int isCritical = 0; int isCMS = 0; int JobStatus = 0; string duedateflagesearch = (ViewState["OverDueSearchFlage"] == null) ? null : (ViewState["OverDueSearchFlage"].ToString()); string QueryFlage = ViewState["Qflag"].ToString(); DataTable dtVessel = new DataTable(); int IsPendingOfcVerify = 0, PostponeJob = 0, FollowupAdded = 0, JobWithMandateRAssess = 0, JobWithSubRAssess = 0, JobDiffToDDock = 0; dtVessel.Columns.Add("VID"); if (rbtDueType.Items[0].Selected && rbtDueType.Items[1].Selected) // This will filter job history with all due and overdue job based on the date specified. If date between is not specified the default date is taken as current date { JobStatus = 3; txtFromDate.Enabled = true; txtToDate.Enabled = true; } else if (rbtDueType.Items[0].Selected || rbtDueType.Items[1].Selected)// This will filter job history with either due or overdue job based on the date specified. If date between is not specified the default date is taken as current date { JobStatus = UDFLib.ConvertToInteger(rbtDueType.SelectedValue); } else if (rbtDueType.Items[0].Selected == false && rbtDueType.Items[1].Selected == false)/* This will display all the job */ { JobStatus = 0; txtFromDate.Text = ""; txtToDate.Text = ""; } if (chkOfcVerify.Checked == true) { IsPendingOfcVerify = 1; } int?jobid = null; int?isHistory = 0; if (QueryFlage != "S") { isHistory = 1; if (QueryFlage == "H" && rbtnJobTypes.SelectedValue == "NONPMS") { isHistory = 3; } jobid = null; if (ViewState["Jobid"] != null) { jobid = Convert.ToInt32(ViewState["Jobid"].ToString()); } } else if (QueryFlage == "S" && rbtnJobTypes.SelectedValue == "NONPMS") { isHistory = 2; } int?SafetyAlarm = null; int?Calibration = null; if (chkAdvSafetyAlarm.Checked == true) { SafetyAlarm = 1; } if (chkAdvCalibration.Checked == true) { Calibration = 1; } if (chkCritical.Checked == true) { isCritical = 1; } else { isCritical = 0; } if (chkCMS.Checked == true) { isCMS = 1; } else { isCMS = 0; } int?Is_RAMandatory = null; //Added by reshma for RA :For Filtering RA form Mandatory jobs int?Is_RASubmitted = null; //Added by reshma for RA :For Filtering RA form submitted jobs if (rbtnMRA.SelectedItem.Value == "YES") { Is_RAMandatory = 1; } else if (rbtnMRA.SelectedItem.Value == "NO") { Is_RAMandatory = 2; } if (rbtnRASubmitted.SelectedItem.Value == "YES") { Is_RASubmitted = 1; } else if (rbtnRASubmitted.SelectedItem.Value == "NO") { Is_RASubmitted = 2; } /* Call Webservice to get JobsCount */ List <string> wVessel = new List <string>(); List <string> wRank = new List <string>(); foreach (DataRow dr in DDLVessel.SelectedValues.Rows) { wVessel.Add(dr[0].ToString()); } foreach (DataRow dr in ucf_DDLRank.SelectedValues.Rows) { wRank.Add(dr[0].ToString()); } string searchjobtitle = txtSearchJobTitle.Text != "" ? txtSearchJobTitle.Text.Trim() : ""; String GetJobCount = "PMs_Get_OverdueJobsCount('" + jobid + "','" + UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue) + "'," + getArrayString(wVessel.ToArray()) + ",'" + UDFLib.ConvertIntegerToNull(ddlFunction.SelectedValue) + "','" + UDFLib.ConvertIntegerToNull(ddlSystem_location.SelectedValue.Split(',')[1]) + "','" + UDFLib.ConvertIntegerToNull(ddlSystem_location.SelectedValue.Split(',')[0]) + "','" + UDFLib.ConvertIntegerToNull(ddlSubSystem_location.SelectedValue.Split(',')[1]) + "','" + UDFLib.ConvertIntegerToNull(ddlSubSystem_location.SelectedValue.Split(',')[0]) + "'," + getArrayString(wRank.ToArray()) + ",'" + null + "','" + UDFLib.ConvertStringToNull(searchjobtitle) + "','" + isCritical + "','" + isCMS + "','" + UDFLib.ConvertDateToNull(txtFromDate.Text) + "','" + UDFLib.ConvertDateToNull(txtToDate.Text) + "','" + isHistory + "','" + JobStatus + "','" + duedateflagesearch + "','" + IsPendingOfcVerify + "','" + SafetyAlarm + "','" + Calibration + "','" + UDFLib.ConvertDateToNull(txtActFrmDate.Text) + "','" + UDFLib.ConvertDateToNull(txtActToDate.Text) + "','" + PostponeJob + "','" + FollowupAdded + "','" + JobWithMandateRAssess + "','" + JobWithSubRAssess + "','" + JobDiffToDDock + "','" + Is_RAMandatory + "','" + Is_RASubmitted + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "GetJobCount", GetJobCount, true); /* Call Webservice to get JobsCount */ ds = objJobStatus.PMS_Get_OverdueJobs(jobid, UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), DDLVessel.SelectedValues, UDFLib.ConvertIntegerToNull(ddlFunction.SelectedValue), UDFLib.ConvertIntegerToNull(ddlSystem_location.SelectedValue.Split(',')[1]), UDFLib.ConvertIntegerToNull(ddlSystem_location.SelectedValue.Split(',')[0]), UDFLib.ConvertIntegerToNull(ddlSubSystem_location.SelectedValue.Split(',')[1]), UDFLib.ConvertIntegerToNull(ddlSubSystem_location.SelectedValue.Split(',')[0]), ucf_DDLRank.SelectedValues, null, txtSearchJobTitle.Text != "" ? txtSearchJobTitle.Text.Trim() : null, isCritical, isCMS, UDFLib.ConvertDateToNull(txtFromDate.Text), UDFLib.ConvertDateToNull(txtToDate.Text), isHistory, JobStatus, duedateflagesearch, IsPendingOfcVerify, SafetyAlarm, Calibration, UDFLib.ConvertDateToNull(txtActFrmDate.Text), UDFLib.ConvertDateToNull(txtActToDate.Text), PostponeJob, FollowupAdded, JobWithMandateRAssess, JobWithSubRAssess, JobDiffToDDock, Is_RAMandatory, Is_RASubmitted, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount, ref totaljobcount, ref odjobcount, ref critodjobcount); DataTable dt = ds.Tables[0]; if (ucCustomPagerItems.isCountRecord == 1) { ucCustomPagerItems.CountTotalRec = rowcount.ToString(); ucCustomPagerItems.BuildPager(); } gvStatus.DataSource = dt; gvStatus.DataBind(); UpdPnlGrid.Update(); UpdPnlFilter.Update(); } catch (Exception ex) { throw ex; } }
/// <summary> /// Bind all records of vetting /// </summary> public void Bind_VettingIndex() { try { BLL_VET_Index objBLLIndx = new BLL_VET_Index(); DataSet ds = new DataSet(); int rowcount = ucCustomPagerItems.isCountRecord; string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString()); int? sortdirection = null; if (ViewState["SORTDIRECTION"] != null) { sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } int IsValid = 0; DataTable dtEXInspector = new DataTable(); dtEXInspector.Columns.Add("ID"); DataTable dtInspector = new DataTable(); dtInspector.Columns.Add("ID"); foreach (DataRow dr in DDLInspector.SelectedValues.Rows) { if (dr[0].ToString().Split('_')[1] == "In") { dtInspector.Rows.Add(dr[0].ToString().Split('_')[0]); } if (dr[0].ToString().Split('_')[1] == "Ex") { dtEXInspector.Rows.Add(dr[0].ToString().Split('_')[0]); } } DateTime?VetFromDate, VetToDate; VetFromDate = txtLVetFromDate.Text.Trim() == "" ? null : UDFLib.ConvertDateToNull(UDFLib.ConvertToDate(txtLVetFromDate.Text)); VetToDate = txtLVetToDate.Text.Trim() == "" ? null : UDFLib.ConvertDateToNull(UDFLib.ConvertToDate(txtLVetToDate.Text)); if (rbtnValid.Checked == true) { IsValid = 1; } ds = objBLLIndx.VET_Get_VettingIndex(DDLVessel.SelectedValues, DDLVetType.SelectedValues, DDLStatus.SelectedValues, txtDueDays.Text == "0" ? UDFLib.ConvertToInteger(txtDueDays.Text.Trim()) : UDFLib.ConvertIntegerToNull(txtDueDays.Text.Trim()), IsValid, UDFLib.ConvertToInteger(rbtnObservation.SelectedValue), DDLOilMajor.SelectedValues, dtInspector, dtEXInspector, VetFromDate, VetToDate, DDLJobStatus.SelectedValues, txtVessel.Text != "" ? txtVessel.Text.Trim() : null, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount); if (ds.Tables.Count > 0) { ViewState["dtObservationCount"] = ds.Tables[1]; ViewState["dtNotesCount"] = ds.Tables[2]; ViewState["dtResponse"] = ds.Tables[3]; ViewState["dtJobsCount"] = ds.Tables[4]; } if (ucCustomPagerItems.isCountRecord == 1) { ucCustomPagerItems.CountTotalRec = rowcount.ToString(); ucCustomPagerItems.BuildPager(); } gvVettingIndex.DataSource = ds.Tables[0]; gvVettingIndex.DataBind(); if (ds.Tables[0].Rows.Count > 0) { btnExport.Enabled = true; } else { btnExport.Enabled = false; } UpdPnlGrid.Update(); UpdPnlFilter.Update(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
/// <summary> /// Bind jobs status /// </summary> /// <param name="VesselId">Vessel Id</param> /// <param name="LocationId">location Id</param> /// <param name="SystemLocation">system location of system</param> /// <param name="SubSystemLocation">sub system location of system</param> /// <param name="DepartmentID">Department Id for system</param> /// <param name="RankID">Rank Id</param> /// <param name="SearchText">Search text like job code or title</param> /// <param name="critical">Check for critical jobs</param> /// <param name="cms">Check for CMS jobs</param> /// <param name="fromdate">from date</param> /// <param name="todate">To date</param> /// <param name="DueDateFlageSearch">For filter like "This Month","Overdue"</param> /// <param name="VerifyFlag">Check for job is verifie or not</param> /// <param name="JobFreq">Set frequency for job</param> /// <param name="IsSafetyAlarm">check IsSafetyAlarm for job</param> /// <param name="IsCalibration">check IsCalibration for job</param> /// <param name="sortby">for sorting </param> /// <param name="sortdirection">for sortdirection</param> /// <param name="pagenumber">used for page number</param> /// <param name="pagesize">used for page size</param> /// <param name="RHDone">for search RunHours done</param> /// <param name="isfetchcount"></param> /// <returns></returns> public void BindJobStatus() { try { BLL_PMS_Job_Status objJobStatus = new BLL_PMS_Job_Status(); DataSet ds = new DataSet(); int rowcount = ucCustomPagerItems.isCountRecord; string vesselcode = (ViewState["VesselCode"] == null) ? null : (ViewState["VesselCode"].ToString()); string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString()); int? sortdirection = null; if (ViewState["SORTDIRECTION"] != null) { sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } string duedateflagesearch = (ViewState["OverDueSearchFlage"] == null) ? null : (ViewState["OverDueSearchFlage"].ToString()); int IsPendingOfcVerify = 0, PostponeJob = 0, FollowupAdded = 0, JobWithMandateRAssess = 0, JobWithSubRAssess = 0, JobDiffToDDock = 0; string QueryFlage = ViewState["Qflag"].ToString(); int isCritical = 0; int isCMS = 0; EnableButton(); int?jobid = null; int?isHistory = 0; if (QueryFlage != "S") { isHistory = 1; if (QueryFlage == "H" && rbtnJobTypes.SelectedValue == "NONPMS") { isHistory = 3; } jobid = null; if (ViewState["Jobid"] != null) { jobid = Convert.ToInt32(ViewState["Jobid"].ToString()); } } else if (QueryFlage == "S" && rbtnJobTypes.SelectedValue == "NONPMS") { isHistory = 2; } if (chkCritical.Checked == true)/* For Filtering Critical jobs */ { isCritical = 1; } if (chkCMS.Checked == true)/* For Filtering CMS jobs */ { isCMS = 1; } if (chkOfcVerify.Checked == true) /* For Filtering jobs pending for office verification */ { IsPendingOfcVerify = 1; } int?SafetyAlarm = null; int?Calibration = null; if (chkAdvSftyAlarm.Checked == true) /* For Filtering Safety alarm jobs*/ { SafetyAlarm = 1; } if (chkAdvCalibration.Checked == true)/* For Filtering Calibration jobs */ { Calibration = 1; } int?Is_RAMandatory = null; //Added by reshma for RA: For Filtering RA mandatory jobs int?Is_RASubmitted = null; //Added by reshma for RA : For Filtering RA form submitted jobs if (rbtnMRA.SelectedItem.Value == "YES") { Is_RAMandatory = 1; } else if (rbtnMRA.SelectedItem.Value == "NO") { Is_RAMandatory = 2; } if (rbtnRASubmitted.SelectedItem.Value == "YES") { Is_RASubmitted = 1; } else if (rbtnRASubmitted.SelectedItem.Value == "NO") { Is_RASubmitted = 2; } /* Below Filters will be added in next phase of development*/ //if (chkAdvPPJobs.Checked == true) // PostponeJob = 1; //if (chkAdvJWMRA.Checked == true) // JobWithMandateRAssess = 1; //if (chkAdvJWSRA.Checked == true) // JobWithSubRAssess = 1; //if (chkAdvJDTDD.Checked == true) // JobDiffToDDock = 1; /* upto this Filters will be added in next phase of development*/ ds = objJobStatus.TecJobStatusIndex(jobid, UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFunction.SelectedValue), UDFLib.ConvertIntegerToNull(ddlSystem_location.SelectedValue.Split(',')[1]), UDFLib.ConvertIntegerToNull(ddlSystem_location.SelectedValue.Split(',')[0]), UDFLib.ConvertIntegerToNull(ddlSubSystem_location.SelectedValue.Split(',')[1]), UDFLib.ConvertIntegerToNull(ddlSubSystem_location.SelectedValue.Split(',')[0]) , ucf_DDLRank.SelectedValues, null, txtSearchJobTitle.Text != "" ? txtSearchJobTitle.Text.Trim() : null , isCritical, isCMS, UDFLib.ConvertDateToNull(txtFromDate.Text), UDFLib.ConvertDateToNull(txtToDate.Text), UDFLib.ConvertDateToNull(txtActFrmDate.Text), UDFLib.ConvertDateToNull(txtActToDate.Text), isHistory, duedateflagesearch, IsPendingOfcVerify, SafetyAlarm, Calibration, PostponeJob, FollowupAdded, JobWithMandateRAssess, JobWithSubRAssess, JobDiffToDDock, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, RHDone, Is_RAMandatory, Is_RASubmitted, ref rowcount); DataTable dt = ds.Tables[0]; DataColumnCollection columns = dt.Columns; if (columns.Contains("RemRhrs")) { for (int k = 0; k < dt.Rows.Count; k++) { if (dt.Rows[k]["FREQUENCY_TYPE"] == "2484" || dt.Rows[k]["FREQUENCY_TYPE"] == "2485") { dt.Rows[k]["RemRhrs"] = System.DBNull.Value; } } } if (ucCustomPagerItems.isCountRecord == 1) { ucCustomPagerItems.CountTotalRec = rowcount.ToString(); ucCustomPagerItems.BuildPager(); } if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { gvStatus.DataSource = dt; gvStatus.DataBind(); } else { gvStatus.DataSource = dt; gvStatus.DataBind(); } } UpdPnlGrid.Update(); UpdPnlFilter.Update(); } catch (Exception ex) { throw ex; } }
/// <summary> /// Binding change request detail /// </summary> /// <param name="Fleet_ID"> fleet id</param> /// <param name="Vessel_ID">vessel</param> /// <param name="SearchText">search keyword</param> /// <param name="Status">Active status</param> /// <param name="SYSTEMID">System</param> /// <param name="SUBSYSTEMID">subsystem</param> /// <param name="DEPARTMENTID">department</param> /// <param name="RANKID">rank</param> public void BindGrid() { try { BLL_PMS_Change_Request objChangeRqst = new BLL_PMS_Change_Request(); int rowcount = ucCustomPagerItems.isCountRecord; string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString()); int?sortdirection = null; if (ViewState["SORTDIRECTION"] != null) { sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } int?status = null; if (optStatus.SelectedValue == "P") { status = 2; } else if (optStatus.SelectedValue == "A") { status = 1; } else if (optStatus.SelectedValue == "R") { status = 0; } DataSet ds = objChangeRqst.TecJobChangeRequestSearch(UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue), txtSearch.Text.Trim() != "" ? txtSearch.Text : null, status, UDFLib.ConvertIntegerToNull(ddlSystem.SelectedValue), UDFLib.ConvertIntegerToNull(ddlSubSystem.SelectedValue), UDFLib.ConvertIntegerToNull(ddlDepartment.SelectedValue) , UDFLib.ConvertIntegerToNull(ddlRank.SelectedValue), null, null, UDFLib.ConvertDateToNull(txtFromDate.Text.Trim()), UDFLib.ConvertDateToNull(txtToDate.Text.Trim()) , sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount); if (ucCustomPagerItems.isCountRecord == 1) { ucCustomPagerItems.CountTotalRec = rowcount.ToString(); ucCustomPagerItems.BuildPager(); } if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { gvJobChangeRqst.DataSource = ds.Tables[0]; gvJobChangeRqst.DataBind(); } else { gvJobChangeRqst.DataSource = ds.Tables[0]; gvJobChangeRqst.DataBind(); } } UpdPnlGrid.Update(); UpdPnlFilter.Update(); } catch (Exception ex) { throw ex; } }