public ActionResult DayPlan(DayPlans dayView) { try { string strReq = ""; string[] arrMsgs; strReq = Request.Url.Query; strReq = strReq.Substring(strReq.IndexOf('?') + 1); if (strReq != null) { arrMsgs = strReq.Split('?'); } Session["Empcd"] = strReq; ListPlans lst = new ListPlans(); dayView.Empcd = EncryDecry.Decrypt(Session["Empcd"].ToString()).Replace("Empcd=", ""); dayView.Date = DateTime.Today.ToString("dd/MM/yyyy"); var Get_Plans = _WPO.GetDayPlanss(dayView); lst.DayPlan = Get_Plans; return(View(lst)); } catch (Exception ex) { return(null); } }
public ActionResult DayPlan(DayPlans dayView, FormCollection frms) { try { string strReq = ""; strReq = Session["Empcd"].ToString(); string[] arrEmpcd; string[] arrMsgs; strReq = strReq.Replace("%2f", "/"); strReq = strReq.Replace("%3F", ""); strReq = strReq.Replace("%2F", "/"); strReq = strReq.Replace("%2B", "+"); strReq = EncryDecry.Decrypt(strReq); if (strReq != null) { arrMsgs = strReq.Split('&'); } else { arrMsgs = null; } arrEmpcd = arrMsgs[0].Split('='); string emp = arrEmpcd[1].ToString().Trim(); dayView.Start = frms["From"]; dayView.End = frms["To"]; dayView.Description = frms["Description"]; dayView.Empcd = emp; ListPlans lst1 = new ListPlans(); var Get_Plans1 = _WPO.DayPlanInsert(dayView); lst1.DayPlan = Get_Plans1; return(View(lst1)); } catch (Exception ex) { return(null); } }
public ActionResult SHOW() { try { if (Request.Form["ShowPlans"] != null) { string principle = Convert.ToString(Request["date"].ToString()); DayPlans dayPlans = new DayPlans(); dayPlans.Empcd = Session["Empcd"].ToString(); dayPlans.Date = principle; var getHistory = _WPO.GetDayPlanss(dayPlans); } ListPlans lst1 = new ListPlans(); return(View(lst1)); } catch (Exception ex) { return(null); } }