protected void ddlDept_SelectedIndexChanged(object sender, EventArgs e) { var mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { var strSql = new StringBuilder(); strSql.Append("select pj_id, pj_code, d_id, pj_name, pj_year, pj_budget, pj_complete_status, pj_category, "); strSql.Append(" pj_approval_status, pj_lastupdate from projects "); strSql.Append(" where pj_status = 'real' and pj_complete_status = N'ไม่อยู่ในเกณฑ์การประเมิน/กรอกสมบูรณ์' and "); strSql.Append(" d_id = " + ddlDept.SelectedValue); SqlDataSource4.SelectCommand = strSql.ToString(); SqlDataSource4.DataBind(); GridView1.DataSource = SqlDataSource4; GridView1.DataBind(); var dtView = (DataView)SqlDataSource4.Select(new DataSourceSelectArguments()); var listt = (from t in dtView.Table.AsEnumerable() group t by t.Field <string>("pj_year") into g orderby g.Key select new { pj_year = g.Key, }); ddlProjectYear.DataSource = listt; ddlProjectYear.DataBind(); ddlProjectYear.Items.Insert(0, new ListItem("[ทุกปีงบประมาณ]", String.Empty)); ddlProjectYear.SelectedIndex = 0; } }
protected void Page_Load(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { string strDocNo = Request.QueryString["docno"]; string strDate = Request.QueryString["datedoc"]; projects pj = new projects(); string strDocNumber = pj.getProjectInfo(ck.pj_id, "pj_doc_number"); if (strDocNumber != string.Empty || strDocNumber.ToLower() != "null") { pj.updateDocNo_DocDate(ck.pj_id, strDocNo, strDate); } string strStatus = pj.getProjectInfo(ck.pj_id, "pj_complete_status"); if (strStatus != "ส่งผลแล้ว") { pj.updateProjectCompleteStatus(ck.pj_id, "ส่งผลแล้ว"); pj.updateReport_Submitted(ck.pj_id, ck.p_id); //gUtilities gt = new gUtilities(); //gt.setFactorImpact(ck.pj_id); //ทำข้อมูลเพื่อแสดงสรุปผลการวิเคราะห์ควาทเสี่ยงภายใน ภายนอก } } }
protected void btnEditProject_Click(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); projects pj = new projects(); string strStatus = pj.getProjectInfo(ck.pj_id, "pj_complete_status"); if (strStatus == "ไม่อยู่ในเกณฑ์การประเมิน/กรอกสมบูรณ์") { linkreport2.Visible = false; linkreport3.Visible = false; btnEditProject.Visible = false; //btnSubmitProject.Visible = false; pnlsubmit.Visible = false; } else if (strStatus != "ส่งผลแล้ว" && strStatus != "ไม่อยู่ในเกณฑ์การประเมิน/กรอกสมบูรณ์") { //ยังไม่ส่งผล และ เป็นโครงการที่ต้องทำการประเมินความเสี่ยง Response.Redirect("project_edit.aspx"); } else { linkreport2.Visible = true; linkreport3.Visible = true; btnEditProject.Visible = true; //btnSubmitProject.Visible = true; pnlsubmit.Visible = true; } }
protected void lbt_proj_name_Click(object sender, EventArgs e) { LinkButton lbt_temp = sender as LinkButton; //option 1 pass with cookies ManageCookie mgCookie = new ManageCookie(); mgCookie.UpdateCookies("pj_id", lbt_temp.CommandArgument); // option 2 pass with QueryString. There are problem with '+' in url //Server.Transfer(Global_config.RootURL + "project_approval_1.aspx" + "?id=" + ton.Encryption.Encrypt(lbt_temp.CommandArgument, ton.Encryption.keyword)); string approval_status = tonUtilities.cleanQueryString(Request.QueryString["status"]); string prefix = "1"; if (approval_status == "1") { prefix = "4"; } else if ((approval_status == "2") || (approval_status == "3") || (approval_status == "4")) { prefix = "5"; } else { prefix = "1"; } Response.Redirect(Global_config.RootURL + "project_approval_" + prefix + ".aspx" + "?id=" + ton.Encryption.Encrypt(lbt_temp.CommandArgument, ton.Encryption.keyword)); }
protected void btnToQ9_6_Click(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); answer ans = new answer(); int ret = ans.insertOrUpdateAnswerQ2(radanswer8_5.SelectedValue, ck.pj_id, "14", "4"); mgCookie.UpdateCookies("answer_q2_id", ret.ToString()); int ret2 = 0; if (radanswer8_5.SelectedIndex == 0) // ตอบว่า ใช่ { // คำถามย่อยข้อ 8.5 ret2 = ans.insertOrUpdateAnswerQ3(txtAnswerQuestion8_5_1.Text, ck.pj_id, "28", ret.ToString()); } else if (radanswer8_5.SelectedIndex == 1) { // คำถามย่อยข้อ 8.5 ret2 = ans.insertOrUpdateAnswerQ3(string.Empty, ck.pj_id, "28", ret.ToString()); } if (ret2 > 0) { //บันทึกสำเร็จ Response.Redirect("question_set_D.aspx?q1=3&q2=6"); } else { //บันทึกไม่สำเร็จ } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { String strPJid = ck.pj_id; string strPjType = string.Empty; StringBuilder strSQL = new StringBuilder(); strSQL.Append("select d.d_code, d.d_name, m.mi_code, m.mi_name, p.pj_code, p.d_id, p.pj_name, y.yut_name, p.pj_year, p.pj_budget, pj_integrateProject, pj_relateDept, pj_background, pj_urgency, pj_type"); strSQL.Append(" from projects p, department d, ministry m, yutasad y"); strSQL.Append(" where p.d_id = d.d_id and p.mi_id = m.mi_id and p.pj_yut_id = y.yut_id and p.pj_id = '" + strPJid + "'"); SqlDataSource4.SelectCommand = strSQL.ToString(); SqlDataSource4.DataBind(); DataView dv1 = (DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty); foreach (DataRow dRow in dv1.Table.Rows) { lblDeptCode.Text = dRow["mi_code"].ToString(); lblDeptName.Text = dRow["mi_name"].ToString(); lblDivisionCode.Text = dRow["d_code"].ToString(); lblDivisionName.Text = dRow["d_name"].ToString(); lblProjectName.Text = dRow["pj_name"].ToString(); lblProjectCode.Text = dRow["pj_code"].ToString(); lblYutasard.Text = dRow["yut_name"].ToString(); //lblIntegrateProject.Text = dRow["pj_integrateProject"].ToString(); //lblRelateDept.Text = dRow["pj_relateDept"].ToString(); lblBudget.Text = dRow["pj_budget"].ToString(); lblYear.Text = dRow["pj_year"].ToString(); strPjType = dRow["pj_type"].ToString(); } if (strPjType.Trim() == "โครงการใหม่") { linkQuestionE.Visible = false; } else if (strPjType.Trim() == "โครงการต่อเนื่องหรือโครงการขยายผล") { linkQuestionE.Visible = true; } else { Response.Redirect("default.aspx"); } } else { //redirect to login page Response.Redirect("default.aspx"); } } }
protected void dgProject_OnRowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); gUtilities gutil = new gUtilities(); double dbTotal = gutil.getReportQSETTotal(ck.p_id); if (dbTotal > 70) { e.Row.Cells[4].Text = "ต่ำ"; } else if (dbTotal <= 70 && dbTotal > 30) { e.Row.Cells[4].Text = "กลาง"; } else { e.Row.Cells[4].Text = "สูง"; } //if ((e.Row.Cells[5].Text == "ใช่" && e.Row.Cells[6].Text == "ใช่" && e.Row.Cells[7].Text == "ใช่") || e.Row.Cells[8].Text == "ใช่") //{ // e.Row.Cells[4].Text = "อยู่ในเกณฑ์การประเมิน"; //} //else //{ // e.Row.Cells[4].Text = "ไม่อยู่ในเกณฑ์การประเมิน"; //} } }
protected void btnNext_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } else { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); SqlParameter pj_cate = new SqlParameter("@pj_category", SqlDbType.NVarChar, 100); pj_cate.Direction = ParameterDirection.Input; pj_cate.Value = radProjectCate.SelectedValue.ToString(); SqlParameter pj_id = new SqlParameter("@pj_id", SqlDbType.Int); pj_id.Direction = ParameterDirection.Input; pj_id.Value = ck.pj_id; insertParameters.Add(pj_cate); insertParameters.Add(pj_id); try { SqlDataSource1.Update(); Response.Redirect("project_type.aspx"); } catch { //ELMA Log } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { String strPJid = ck.pj_id; //String strPJCode = "01001-100"; StringBuilder strSQL = new StringBuilder(); strSQL.Append("select d.d_code, d.d_name, m.mi_code, m.mi_name, p.pj_code, p.d_id, p.pj_name, y.yut_name, p.pj_year, p.pj_budget, pj_integrateProject, pj_relateDept, pj_background, pj_urgency, pj_category"); strSQL.Append(" from projects p, department d, ministry m, yutasad y"); strSQL.Append(" where p.d_id = d.d_id and p.mi_id = m.mi_id and p.pj_yut_id = y.yut_id and p.pj_id = " + strPJid); SqlDataSource4.SelectCommand = strSQL.ToString(); SqlDataSource4.DataBind(); DataView dv1 = (DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty); foreach (DataRow dRow in dv1.Table.Rows) { lblDeptCode.Text = dRow["mi_code"].ToString(); lblDeptName.Text = dRow["mi_name"].ToString(); lblDivisionCode.Text = dRow["d_code"].ToString(); lblDivisionName.Text = dRow["d_name"].ToString(); lblProjectName.Text = dRow["pj_name"].ToString(); lblProjectCode.Text = dRow["pj_code"].ToString(); lblYutasard.Text = dRow["yut_name"].ToString(); lblIntegrateProject.Text = dRow["pj_integrateProject"].ToString(); lblRelateDept.Text = dRow["pj_relateDept"].ToString(); lblBudget.Text = dRow["pj_budget"].ToString(); lblYear.Text = dRow["pj_year"].ToString(); if (dRow["pj_category"].ToString() != string.Empty) { if (dRow["pj_category"].ToString() == "บริหารทั่วไป") { radProjectCate.SelectedIndex = 0; } else if (dRow["pj_category"].ToString() == "บริหารสังคม") { radProjectCate.SelectedIndex = 1; } else if (dRow["pj_category"].ToString() == "เศรษฐกิจ") { radProjectCate.SelectedIndex = 2; } } } } else { //redirect to login page } } }
public ActionResult Login(UserModel value) { string SHA256Hash = AccountModel.LoginUser(value); Response.Cookies.Add(ManageCookie.CreateCookie(SHA256Hash)); return(RedirectToAction("Index", "Home")); }
protected void Page_Load(object sender, EventArgs e) { ton.tonUtilities.pageaAuthorize(ton.config.Global_config.authtext_mangeuser, ton.config.Global_config.warning_text); var mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); user_role_id.Value = ck.p_role_id; }
protected void btnNext_Click(object sender, EventArgs e) { //บันทักข้อมูล ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); answer ans = new answer(); }
protected void Page_Load(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { string strDeptID = ck.d_code; //Redirect Login users to pending page //redirectToPendingPage(); //string strDeptID = "01001"; string strProjectStatus = ck.pj_status; //keep project code in cookie for usage in follwing pages mgCookie.UpdateCookies("pj_status", strProjectStatus); string strSQL1 = "select * from dbo.department d, dbo.ministry m where d.mi_id = m.mi_id and d.d_code = '" + strDeptID + "'"; SqlDataSource4.SelectCommand = strSQL1; SqlDataSource4.DataBind(); DataView dv1 = (DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty); foreach (DataRow dRow in dv1.Table.Rows) { lblDeptCode.Text = dRow["mi_code"].ToString(); lblDeptName.Text = dRow["mi_name"].ToString(); lblDivisionCode.Text = dRow["d_code"].ToString(); lblDivisionName.Text = dRow["d_name"].ToString(); mgCookie.UpdateCookies("mi_id", dRow["mi_id"].ToString()); } if (!Page.IsPostBack) { string strSQL = "SELECT * from dbo.projects where pj_id = " + ck.pj_id; SqlDataSource2.SelectCommand = strSQL; SqlDataSource2.DataBind(); DataView dv = (DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty); lblProjectCode.Text = dv.Table.Rows[0]["pj_code"].ToString(); txtProjectName.Text = dv.Table.Rows[0]["pj_name"].ToString(); ddlYudtasad.SelectedValue = dv.Table.Rows[0]["pj_yut_id"].ToString(); ddlYear.SelectedValue = dv.Table.Rows[0]["pj_year"].ToString(); txtBudget.Text = dv.Table.Rows[0]["pj_budget"].ToString(); DropDownList2.SelectedValue = dv.Table.Rows[0]["pj_budget_type"].ToString(); //txtIntegrate.Text = dv.Table.Rows[0]["pj_integrateproject"].ToString(); //txtRelate.Text = dv.Table.Rows[0]["pj_relateDept"].ToString(); } } }
public ActionResult Contact() { ViewBag.Message = "Your contact page."; if (ManageCookie.CheckCookieExists() == null) { return(RedirectToAction("LoginPage")); } return(View()); }
public ActionResult Video() { ViewBag.Title = "Login Page"; if (ManageCookie.CheckCookieExists() == null) { return(RedirectToAction("LoginPage")); } return(View()); }
public void SetCookie(string userName) { var userCookie = CmsUser(userName).ToDictionary(); var cookie = new ManageCookie(); cookie.RemoveCookie("APPUSER"); cookie.SetCookie("APPUSER", userCookie); LoginTime(userName); }
// GET: Admin public ActionResult Index() { if (ManageCookie.isAdmin() == false) { return(RedirectToAction("Index", "Home")); } ViewBag.Title = "Admin Page"; return(View()); }
protected void Page_Load(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); projects pj = new projects(); dgProject.DataSource = pj.getProject_Not_Require_Approval(ck.p_id); dgProject.DataBind(); }
public ActionResult Statistics() { ViewBag.Title = "Statistics"; if (ManageCookie.isAdmin() == false) { return(RedirectToAction("Index", "Home")); } return(View()); }
public ActionResult updateEvent(FormCollection eventUpdate) { if (ManageCookie.isAdmin() == false) { return(RedirectToAction("Index", "Home")); } AdminModel.updateEventInput(eventUpdate); return(RedirectToAction("Events", "Admin")); }
public void SetCookie(string userName) { var login = LoginTime(userName); var user = AppUser(login); var userCookie = user.GetBySerial(); var cookie = new ManageCookie(); cookie.RemoveCookie("AzRADMINUSER"); cookie.SetCookie("AzRADMINUSER", userCookie); }
protected void Page_Load(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); projects pj = new projects(); dgProject.DataSource = pj.getProjectInfoAll_Real_notSubmitted(ck.p_id); dgProject.DataBind(); }
protected void btnNext_Click(object sender, EventArgs e) { //บันทักข้อมูล ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); answer ans = new answer(); int ret = ans.insertOrUpdateAnswerQ2(radQ2.SelectedValue, ck.pj_id, ck.q2_id, ck.qset_id); mgCookie.UpdateCookies("answer_q2_id", ret.ToString()); int ret2 = 0; if (radQ2.SelectedIndex == 0) // ตอบว่า ใช่ { // คำถามย่อยข้อ 1.1 ret2 = ans.insertOrUpdateAnswerQ3(txtAnswerQuestion3_6.Text, ck.pj_id, "6", ret.ToString()); // คำถามย่อยข้อ 1.2 ret2 = ans.insertOrUpdateAnswerQ3(txtAnswerQuestion3_7.Text, ck.pj_id, "7", ret.ToString()); // คำถามย่อยข้อ 1.3 ret2 = ans.insertOrUpdateAnswerQ3(txtAnswerQuestion3_8.Text, ck.pj_id, "8", ret.ToString()); } else { // คำถามย่อยข้อ 1.1 ret2 = ans.insertOrUpdateAnswerQ3(string.Empty, ck.pj_id, "6", ret.ToString()); // คำถามย่อยข้อ 1.2 ret2 = ans.insertOrUpdateAnswerQ3(string.Empty, ck.pj_id, "7", ret.ToString()); // คำถามย่อยข้อ 1.3 ret2 = ans.insertOrUpdateAnswerQ3(string.Empty, ck.pj_id, "8", ret.ToString()); } if (ret2 > 0) { //บันทึกสำเร็จ //Response.Redirect("project_edit.aspx"); litfinish.Text = "เสร็จสิ้นการแก้ไขประเมินชุด ก: ขั้นตอนการริเริ่มแผนงาน/โครงการและวิเคราะห์เบื้องต้น โปรดดำเนินการต่อ"; litfinish.Visible = true; btnToQB.Visible = true; panel2.Visible = false; } else { //บันทึกไม่สำเร็จ } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { string strPJCode = ck.pj_code; string strPJStatus = ck.pj_status; string strPJ_ID = ck.pj_id; StringBuilder strSQL = new StringBuilder(); strSQL.Append("select d.d_code, d.d_name, m.mi_code, m.mi_name, p.pj_code, p.d_id, p.pj_name, y.yut_name, p.pj_year, p.pj_budget, pj_integrateProject, pj_relateDept, pj_filter_q1, pj_filter_q2, pj_filter_q3, pj_filter_q4 "); strSQL.Append(" from projects p, department d, ministry m, yutasad y"); strSQL.Append(" where p.d_id = d.d_id and p.mi_id = m.mi_id and p.pj_yut_id = y.yut_id and p.pj_id = " + strPJ_ID); SqlDataSource4.SelectCommand = strSQL.ToString(); SqlDataSource4.DataBind(); DataView dv1 = (DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty); if (dv1.Table.Rows.Count > 0) { foreach (DataRow dRow in dv1.Table.Rows) { lblDeptCode.Text = dRow["mi_code"].ToString(); lblDeptName.Text = dRow["mi_name"].ToString(); lblDivisionCode.Text = dRow["d_code"].ToString(); lblDivisionName.Text = dRow["d_name"].ToString(); lblProjectName.Text = dRow["pj_name"].ToString(); lblProjectCode.Text = dRow["pj_code"].ToString(); lblYutasard.Text = dRow["yut_name"].ToString(); lblIntegrateProject.Text = dRow["pj_integrateProject"].ToString(); lblRelateDept.Text = dRow["pj_relateDept"].ToString(); lblBudget.Text = dRow["pj_budget"].ToString(); lblYear.Text = dRow["pj_year"].ToString(); radQ1.SelectedValue = dRow["pj_filter_q1"].ToString(); radQ2.SelectedValue = dRow["pj_filter_q2"].ToString(); } } else { //cannot display project details, redirect to login page } } else { //cannot find user login cookie, redirect to login page } } }
protected void btn_save_fm_Click(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (String.IsNullOrEmpty(ck.pj_id)) { ton.JavaScript.MessageBox(" โปรเจค ID ว่างเปล่า กรุณาเข้าสู่ระบบอีกครั้ง "); return; } Button btn_tmep = sender as Button; Control c = btn_tmep.Parent; Page.Validate("error_panel_" + btn_tmep.CommandArgument); if (!Page.IsValid) { return; } if (btn_tmep.CommandName == "save") { int panel_index = Convert.ToInt32(btn_tmep.CommandArgument); string suffix = panel_index.ToString() + "_"; int sum = 0; int total = fm[panel_index - 1]; for (int i = 1; i <= total; i++) { string final_suffix = suffix + i.ToString(); answer_factors_sub ans_fact_sub = new answer_factors_sub(); ans_fact_sub.af_opportunity = (c.FindControl("ddl_oppo_" + final_suffix) as DropDownList).SelectedValue; ans_fact_sub.af_effect = (c.FindControl("ddl_effect_" + final_suffix) as DropDownList).SelectedValue; ans_fact_sub.af_impact = (c.FindControl("ddl_impact_" + final_suffix) as DropDownList).SelectedValue; ans_fact_sub.factors_sub_etc = (c.FindControl("txt_fs_factors_etc_" + panel_index) as TextBox).Text; ans_fact_sub.description_more = (c.FindControl("txt_desc_more_text_" + panel_index) as TextBox).Text; ans_fact_sub.fs_id = (c.FindControl("lbl_fs_id_" + final_suffix) as Label).Text; ans_fact_sub.pj_id = ck.pj_id; int result = ans_fact_sub.saveToTable(); if (result > 0) { sum++; } } if (c is Panel) { Panel pnl_temp = c as Panel; pnl_temp.Enabled = false; btn_tmep.Visible = false; btn_next.Visible = true; } ton.JavaScript.MessageBox("บันทึก สำเร็จ " + sum + " จาก " + total + " ข้อ "); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); if (ck != null) { String strPJid = ck.pj_id; StringBuilder strSQL = new StringBuilder(); strSQL.Append("select d.d_code, d.d_name, m.mi_code, m.mi_name, p.pj_code, p.d_id, p.pj_name, y.yut_name, p.pj_year, p.pj_budget, pj_integrateProject, pj_relateDept, pj_background, pj_urgency, pj_type, pj_complete_status "); strSQL.Append(" from projects p, department d, ministry m, yutasad y"); strSQL.Append(" where p.d_id = d.d_id and p.mi_id = m.mi_id and p.pj_yut_id = y.yut_id and p.pj_id = '" + strPJid + "'"); SqlDataSource4.SelectCommand = strSQL.ToString(); SqlDataSource4.DataBind(); DataView dv1 = (DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty); foreach (DataRow dRow in dv1.Table.Rows) { lblDeptCode.Text = dRow["mi_code"].ToString(); lblDeptName.Text = dRow["mi_name"].ToString(); lblDivisionCode.Text = dRow["d_code"].ToString(); lblDivisionName.Text = dRow["d_name"].ToString(); lblProjectName.Text = dRow["pj_name"].ToString(); lblProjectCode.Text = dRow["pj_code"].ToString(); lblYutasard.Text = dRow["yut_name"].ToString(); //lblIntegrateProject.Text = dRow["pj_integrateProject"].ToString(); //lblRelateDept.Text = dRow["pj_relateDept"].ToString(); lblBudget.Text = dRow["pj_budget"].ToString(); lblYear.Text = dRow["pj_year"].ToString(); } gUtilities gt = new gUtilities(); litRisk1.Text = gt.getReportTammaTotal(ck.pj_id); litRisk2.Text = gt.getReportFactorRiskTotal(ck.pj_id); // litRisk12.Text = gt.getReportTammaMainTotal(ck.pj_id); // litRisk13.Text = gt.getReportTammaSubTotal(ck.pj_id); if (dv1.Table.Rows[0]["pj_complete_status"].ToString() == null) { Response.Redirect("project_summary.aspx"); } } else { //redirect Response.Redirect("project_summary.aspx"); } } }
protected void lkbLogout_Click(object sender, EventArgs e) { ManageCookie mgCookie = new ManageCookie(); users ck = mgCookie.ReadCookies(); int retVal = gUtilities.Logout(ck); if (retVal == 0) { Response.Redirect("default.aspx"); } }
public ActionResult EditPlace(FormCollection userUpdate) { if (ManageCookie.isAdmin() == false) { return(RedirectToAction("Index", "Home")); } ViewBag.Title = "Place Edit"; bool isUpdate = AdminModel.updatePlaceInput(userUpdate); return(RedirectToAction("Places")); }
public ActionResult Events() { if (ManageCookie.isAdmin() == false) { return(RedirectToAction("Index", "Home")); } ViewBag.Title = "Events Managments"; ViewBag.EventsList = AdminModel.getEventsList(); return(View()); }
public ActionResult Places(FormCollection form) { if (ManageCookie.isAdmin() == false) { return(RedirectToAction("Index", "Home")); } ViewBag.Title = "Places Managments"; ViewBag.PlacesList = AdminModel.filterPlaces(form); return(View()); }