protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int Vessel_Id = Convert.ToInt32(Request.QueryString["Vessel_Id"]); lblVessel.Text = Convert.ToString(Request.QueryString["Vessel_Short_Name"]); lblProgramName.Text = BLL_LMS_Training.Get_ProgramDescriptionbyId(Convert.ToInt32(Request.QueryString["Program_Id"])).Rows[0]["PROGRAM_Name"].ToString(); lblProgramDescription.Text = BLL_LMS_Training.Get_ProgramDescriptionbyId(Convert.ToInt32(Request.QueryString["Program_Id"])).Rows[0]["PROGRAM_DESCRIPTION"].ToString(); ds_TrgPrgDetails = BLL_LMS_Training.GET_Program_Summary(Convert.ToInt32(Request.QueryString["Program_Id"]), Convert.ToInt32(Request.QueryString["SCHEDULE_ID"]), Convert.ToInt32(Request.QueryString["Office_Id"]), Vessel_Id); lblRemarks.Text = ds_TrgPrgDetails.Tables[3].Rows[0]["Remarks"].ToString(); if (ds_TrgPrgDetails.Tables[3].Rows[0]["TRG_START_DATE"].ToString().Trim() != "") { lblTrgStDate.Text = UDFLib.ConvertDateToNull(ds_TrgPrgDetails.Tables[3].Rows[0]["TRG_START_DATE"].ToString()).Value.ToString("dd/MMM/yyyy"); } if (ds_TrgPrgDetails.Tables[3].Rows[0]["TRG_END_DATE"].ToString().Trim() != "") { lblTrgEnDate.Text = UDFLib.ConvertDateToNull(ds_TrgPrgDetails.Tables[3].Rows[0]["TRG_END_DATE"].ToString()).Value.ToString("dd/MMM/yyyy"); } if (ds_TrgPrgDetails.Tables[3].Rows[0]["Program_Category_Id"].ToString() == "4") { btndrillactivity.Visible = true; } else { btndrillactivity.Visible = false; } dtResourceItem = ds_TrgPrgDetails.Tables[1]; dtAttendees = ds_TrgPrgDetails.Tables[2]; gvTrainingProgram_Details.DataSource = ds_TrgPrgDetails.Tables[0]; gvTrainingProgram_Details.DataBind(); } //string msg1 = String.Format("$('.sailingInfo').SailingInfo();"); //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgshowdetails", msg1, true); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { UserAccessValidation(); hdfProgram_Id.Value = Request.QueryString["Program_Id"]; bindProgramcategory(); if (UDFLib.ConvertToInteger(hdfProgram_Id.Value) > 0) { DataTable dtProgramDetails = BLL_LMS_Training.Get_ProgramDescriptionbyId(Convert.ToInt32(hdfProgram_Id.Value)); if (dtProgramDetails.Rows.Count > 0) { txtProgramName.Text = Convert.ToString(dtProgramDetails.Rows[0]["PROGRAM_Name"]); txtProgramDescription.Text = Convert.ToString(dtProgramDetails.Rows[0]["PROGRAM_DESCRIPTION"]); txtDuration.Text = Convert.ToString(dtProgramDetails.Rows[0]["DURATION"]); ddlProgramCategory.SelectedValue = Convert.ToString(dtProgramDetails.Rows[0]["PROGRAM_CATEGORY_ID"]); ViewState["OrgType"] = dtProgramDetails.Rows[0]["PROGRAM_CATEGORY_ID"]; ddlProgramCategory.Enabled = false; hdfProgramCategory.Value = ddlProgramCategory.SelectedValue; if (UDFLib.ConvertStringToNull(dtProgramDetails.Rows[0]["PROGRAM_TYPE"]) == "JIBETRAINING") { rdbVideo.Checked = true; } else { rdbTraining.Checked = true; } IsProgram_Scheduled = Convert.ToString(dtProgramDetails.Rows[0]["PROGRAM_SCHEDULED"]); } } else { btnNewChapter.Visible = false; } BindItemTreeView(); } // use javascript to open the add new chapter if program id is not null else create program and open chapter page if (UDFLib.ConvertToInteger(hdfProgram_Id.Value) > 0) { btnNewChapter.OnClientClick = "Show_Chapter_Details(null); return false"; btnNewChapter.Enabled = true; } if (IsProgram_Scheduled == "Y") { txtProgramName.Enabled = false; txtProgramDescription.Enabled = false; txtDuration.Enabled = false; ddlProgramCategory.Enabled = false; rdbVideo.Enabled = false; rdbTraining.Enabled = false; btnSaveProgram.Visible = false; btnNewChapter.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillItemType(); string IsProgram_Scheduled = null; Session["vsAttachmentData"] = null; Session["vsAttachmentFileName"] = null; DataTable dtChapterItemList = new DataTable(); dtChapterItemList.Columns.Add("ChapterItemId", typeof(int)); dtChapterItemList.PrimaryKey = new DataColumn[] { dtChapterItemList.Columns["ChapterItemId"] }; ViewState["dtChapterItemList"] = dtChapterItemList; ViewState["Chapter_Id"] = Request.QueryString["Chapter_Id"]; UserAccessValidation(); BindChapterItem(); BindTrainerlist(); DataTable dt = BLL_LMS_Training.Get_ProgramDescriptionbyId(Convert.ToInt32(Request.QueryString["Program_Id"])); if (dt.Rows.Count > 0) { lblProgramName.Text = dt.Rows[0]["PROGRAM_Name"].ToString(); IsProgram_Scheduled = dt.Rows[0]["Program_Scheduled"].ToString(); } if (UDFLib.ConvertIntegerToNull(ViewState["Chapter_Id"]) != null) { txtChapterName.Text = BLL_LMS_Training.Get_ChapterDescriptionbyId(Convert.ToInt32(ViewState["Chapter_Id"])); btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (IsProgram_Scheduled == "Y") { txtChapterName.Enabled = false; btnDelete.Enabled = false; // btnAddNewItem.Enabled=false; // gvItemList.Enabled =false; gvTrainerRank.Enabled = false; //btnsaveandclose.Enabled =false; //btnCancel.Enabled = false; } if (UDFLib.ConvertIntegerToNull(Request.QueryString["ProgramCategory"]) == 4) { gvTrainerRank.Enabled = false; } } }