protected void LoadInterviewSheet(int RankId) { ddlInterviewSheet.Items.Clear(); BLL_Crew_Admin objCrewAdmin = new BLL_Crew_Admin(); ddlInterviewSheet.DataSource = objCrewAdmin.Get_InterviewSheets(RankId, "Interview"); ddlInterviewSheet.DataBind(); ddlInterviewSheet.Items.Insert(0, new ListItem("-Select-", "0")); }
protected void LoadInterviewSheet(int RankId) { (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).Items.Clear(); BLL_Crew_Admin objCrewAdmin = new BLL_Crew_Admin(); DataTable dt = objCrewAdmin.Get_InterviewSheets(RankId, "Interview"); (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).DataSource = dt; (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).DataTextField = "INTERVIEW_NAME"; (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).DataValueField = "ID"; (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).DataBind(); (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).Items.Insert(0, new ListItem("-SELECT-", "0")); (frmInterviewDetails.FindControl("ddlInterviewSheet") as DropDownList).SelectedIndex = 0; }
protected void Page_Load(object sender, EventArgs e) { lblMessage.Text = ""; TodayDateFormat = UDFLib.DateFormatMessage(); DFormat = CalendarExtender1.Format = UDFLib.GetDateFormat(); if (!IsPostBack) { int CrewID = GetCrewID(); int CurrentUserID = GetSessionUserID(); Session["CrewID"] = CrewID; hdnUserID.Value = CurrentUserID.ToString(); hdnCrewID.Value = CrewID.ToString(); if (CrewID > 0) { int CurrentRankId = 0; DataTable dtPersonalDetail = objCrewBLL.Get_CrewPersonalDetailsByID1(CrewID); if (dtPersonalDetail.Rows.Count > 0) { CurrentRankId = int.Parse(dtPersonalDetail.Rows[0]["CurrentRankID"].ToString()); txtPlanCrewName.Text = dtPersonalDetail.Rows[0]["Staff_FullName"].ToString(); } ddlInterviewSheet.DataSource = objCrewAdmin.Get_InterviewSheets(CurrentRankId, "Briefing"); ddlInterviewSheet.DataBind(); ddlPlanRank.DataSource = objCrewAdmin.Get_RankList(); ddlPlanRank.DataBind(); ddlPlanRank.Enabled = false; DataTable dt = objTimeZone.Get_TimeZoneList(); ddlTimeZone.DataSource = dt; ddlTimeZone.DataTextField = "DisplayName"; ddlTimeZone.DataValueField = "TimeZone"; ddlTimeZone.DataBind(); try { DataRow[] dr = dt.Select("DefaultTimeZone=1"); if (dr.Length > 0) { ddlTimeZone.SelectedValue = dr[0]["TimeZone"].ToString(); } } catch { } ddlPlanRank.SelectedValue = CurrentRankId.ToString(); int IsMandatoryDocumentsUploaded = objCrewBLL.IsMandatoryDocumentsUploaded(CrewID); if (IsMandatoryDocumentsUploaded == 0) { lblMessage.Text = "Briefing can not be planned for the crew. The necessery documents are not yet uploaded!!"; return; } GetVoyageCount(CrewID); } } UserAccessValidation(); }