public ActionResult Edit(int Id, FormCollection form) { try { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/UserPageRelation/GetUserPageRaltion?UPRID=" + Id); response.EnsureSuccessStatusCode(); Models.SP_GetAllUserPageRelations_Result UserPageRaltion = response.Content.ReadAsAsync <Models.SP_GetAllUserPageRelations_Result>().Result; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(UserPageRaltion), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewBag.UserRoles = GetActiveUserRoles(); ViewBag.SelectedURID = UserPageRaltion.URID; ViewBag.WebPages = GetWebPageByID(UserPageRaltion.WPID); ViewBag.SelectedWPID = UserPageRaltion.WPID; return(PartialView("_Edit", UserPageRaltion)); } catch (Exception ex) { throw; } }
public ActionResult ChangePassword(FormCollection form) { ChangePassword model = new ChangePassword(); try { UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); if (ModelState.IsValid) { } } catch (Exception) { } return(PartialView("_ChangePassword", model)); }
public ActionResult Create(FormCollection form) { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion SBP_BlotterTrade model = new SBP_BlotterTrade(); try { UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); if (ModelState.IsValid) { model.Trade_Date = DateTime.Now.Date; ViewBag.TradeTransactionTitles = GetAllTradeTransactionTitles(); } } catch (Exception ex) { } return(PartialView("_Create", model)); }
public ActionResult _Create(SBP_BlotterRECON BlotterRECON, FormCollection form) { try { if (ModelState.IsValid) { BlotterRECON.UserID = Convert.ToInt16(Session["UserID"].ToString()); BlotterRECON.BID = Convert.ToInt16(Session["BranchID"].ToString()); BlotterRECON.BR = Convert.ToInt16(Session["BR"].ToString()); BlotterRECON.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString()); BlotterRECON.CreateDate = DateTime.Now; BlotterRECON.NostroBankId = Convert.ToInt32(form["NostroBankId"].ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("api/BlotterRECON/InsertRECON", BlotterRECON); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterRECON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("BlotterRECON")); } else { ViewBag.RECONNostroBanks = GetAllNostroBanks(); } } catch (Exception ex) { } return(RedirectToAction("BlotterRECON", BlotterRECON)); }
public ActionResult Create() { var ActiveAction = RouteData.Values["action"].ToString(); var ActiveController = RouteData.Values["controller"].ToString(); Session["ActiveAction"] = ActiveController; Session["ActiveController"] = ActiveAction; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); SBP_BlotterClearing model = new SBP_BlotterClearing(); try { if (ModelState.IsValid) { model.Clearing_Date = DateTime.Now.Date; ViewBag.ClearingTransactionTitles = GetAllClearingTransactionTitles(); } else { ViewBag.ClearingTransactionTitles = GetAllClearingTransactionTitles(); } } catch (Exception ex) { } return(PartialView("_Create", model)); }
public ActionResult Edit(int id, FormCollection form) { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/BlotterTrade/GetBlotterTrade?id=" + id.ToString()); response.EnsureSuccessStatusCode(); Models.SBP_BlotterTrade BlotterTrade = response.Content.ReadAsAsync <Models.SBP_BlotterTrade>().Result; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterTrade), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); var isDateChangable = Convert.ToBoolean(Session["CurrentPagesAccess"].ToString().Split('~')[2]); ViewData["isDateChangable"] = isDateChangable; ViewBag.TradeTransactionTitles = GetAllTradeTransactionTitles(); return(PartialView("_Edit", BlotterTrade)); }
public ActionResult Delete(int id) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.DeleteResponse("api/GazettedHolidays/DeleteGH?id=" + id.ToString()); response.EnsureSuccessStatusCode(); if (response.IsSuccessStatusCode) { string jsonResponse = response.Content.ReadAsStringAsync().Result; var JsonLinq = JObject.Parse(jsonResponse); WebApiResponse getreponse = new WebApiResponse(); getreponse.Status = Convert.ToBoolean(JsonLinq["Status"]); getreponse.Message = JsonLinq["Message"].ToString(); getreponse.Data = JsonLinq["Data"].ToString(); if (getreponse.Status == true) { TempData["DataStatus"] = getreponse.Message; } else { TempData["DataStatus"] = getreponse.Message; } } UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(id), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("GazettedHoliday")); }
// GET: UsersProfile public ActionResult UserProfile(FormCollection form) { try { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/UsersProfile/GetAllUsers"); response.EnsureSuccessStatusCode(); List <Models.sp_GetAllUsers_Result> UsersProfile = response.Content.ReadAsAsync <List <Models.sp_GetAllUsers_Result> >().Result; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(UsersProfile), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(PartialView("_UserProfile", UsersProfile)); } catch (Exception ex) { throw; } }
// GET: BlotterReservedDiff public ActionResult BlotterReservedDiff(FormCollection form) { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/BlotterReservedDiff/GetAllblotterReserved?UserID=" + Session["UserID"].ToString() + "&BranchID=" + Session["BranchID"].ToString() + "&CurID=" + selectCurrency + "&BR=" + Session["BR"].ToString()); response.EnsureSuccessStatusCode(); List <Models.SP_GetSBP_Reserved_Result> blotterReserved = response.Content.ReadAsAsync <List <Models.SP_GetSBP_Reserved_Result> >().Result; if (blotterReserved.Count < 1) { ViewData["DataStatus"] = "Data Not Availavle"; } ViewBag.Title = "All Blotter Setup"; var PAccess = Session["CurrentPagesAccess"].ToString().Split('~'); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(blotterReserved), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewData["isDateChangable"] = Convert.ToBoolean(PAccess[2]); ViewData["isEditable"] = Convert.ToBoolean(PAccess[3]); ViewData["IsDeletable"] = Convert.ToBoolean(PAccess[4]); return(PartialView("_BlotterReservedDiff", blotterReserved)); }
public ActionResult Edit(int id, FormCollection form) { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/BlotterCRD/GetBlotterCRD?id=" + id.ToString()); response.EnsureSuccessStatusCode(); Models.SBP_BlotterCRD BlotterCRD = response.Content.ReadAsAsync <Models.SBP_BlotterCRD>().Result; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterCRD), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewBag.Nostro_Accountid = BlotterCRD.Nostro_Account; ViewBag.CRDNostroBanks = GetAllNostroBanks(); return(PartialView("_Edit", BlotterCRD)); }
public ActionResult Update(Models.SBP_BlotterTrade BlotterTrade) { try { if (ModelState.IsValid) { BlotterTrade.Trade_OutFLow = UC.CheckNegativeValue(BlotterTrade.Trade_OutFLow); if (BlotterTrade.Trade_Date == null) { BlotterTrade.Trade_Date = DateTime.Now; } BlotterTrade.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString()); BlotterTrade.UpdateDate = DateTime.Now; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterTrade), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/BlotterTrade/UpdateTrade", BlotterTrade); response.EnsureSuccessStatusCode(); //ViewData["SysCurrentDt"] = GetCurrentDT().ToString("dd-MMM-yyyy"); //ViewData["BrCode"] = BrCode; return(RedirectToAction("BlotterTrade")); } else { ViewBag.TradeTransactionTitles = GetAllTradeTransactionTitles(); } } catch (Exception ex) { } return(PartialView("_Edit", BlotterTrade)); }
public ActionResult _Create(NostroBank NostroBank, FormCollection form) { try { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion if (ModelState.IsValid) { NostroBank.CreateDate = DateTime.Now; NostroBank.CurId = Convert.ToInt32(Session["SelectedCurrency"].ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("api/NostroBank/InsertNostroBank", NostroBank); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(NostroBank), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("NostroBanks")); } } catch (Exception ex) { } return(RedirectToAction("NostroBanks")); }
public ActionResult Edit(int id, FormCollection form) { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/UsersProfile/GetUser?id=" + id.ToString()); response.EnsureSuccessStatusCode(); Models.SBP_LoginInfo SBP_LoginInfo = response.Content.ReadAsAsync <Models.SBP_LoginInfo>().Result; SBP_LoginInfo.Password = ""; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(SBP_LoginInfo), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewBag.AllBranchNames = GetBranchesNames(); ViewBag.UserRoles = GetUserRoles(); return(PartialView("_Edit", SBP_LoginInfo)); }
public ActionResult Create(FormCollection form) { try { UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion return(PartialView("_Create")); } catch (Exception ex) { } return(PartialView("_Create")); }
public ActionResult Create() { SBP_BlotterOutRight model = new SBP_BlotterOutRight(); try { UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); var ActiveAction = RouteData.Values["action"].ToString(); var ActiveController = RouteData.Values["controller"].ToString(); Session["ActiveAction"] = ActiveAction; Session["ActiveController"] = ActiveController; if (ModelState.IsValid) { model.CreateDate = DateTime.Now.Date; model.Date = DateTime.Now.Date; //ViewBag.FRBanks = GetAllNostroBanks(); } } catch (Exception ex) { } return(PartialView("_Create", model)); }
public ActionResult Reset(int id) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.DeleteResponse("api/BlotterManualDeals/ResetEstAdjBal?id=" + id.ToString()); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(id), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("EstimatedAdjustedBalance")); }
public ActionResult Delete(int id) { UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(id), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.DeleteResponse("api/NostroBank/DeleteNostroBank?id=" + id.ToString()); response.EnsureSuccessStatusCode(); return(RedirectToAction("NostroBanks")); }
public ActionResult Delete(IEnumerable <int> employeeIdsToDelete) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("api/BlotterOutRight/DeleteOutRight", employeeIdsToDelete); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(employeeIdsToDelete), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("BlotterOutRight")); }
public ActionResult Update(Branches Branches) { Branches.UpdateDate = DateTime.Now; ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/Branches/UpdateBranches", Branches); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(Branches), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("Branches")); }
public ActionResult Edit(int id) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/Branches/GetBranches?id=" + id.ToString()); response.EnsureSuccessStatusCode(); Models.Branches Branches = response.Content.ReadAsAsync <Models.Branches>().Result; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(Branches), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(View(Branches)); }
public ActionResult GazettedHoliday(FormCollection form) { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/GazettedHolidays/GetAllBlotterGH?UserID=" + Session["UserID"].ToString()); response.EnsureSuccessStatusCode(); List <Models.SP_GetSBPBlotterGH_Result> blotterGH = new List <Models.SP_GetSBPBlotterGH_Result>(); if (response.IsSuccessStatusCode) { string jsonResponse = response.Content.ReadAsStringAsync().Result; var JsonLinq = JObject.Parse(jsonResponse); WebApiResponse getreponse = new WebApiResponse(); getreponse.Status = Convert.ToBoolean(JsonLinq["Status"]); getreponse.Message = JsonLinq["Message"].ToString(); getreponse.Data = JsonLinq["Data"].ToString(); if (getreponse.Message == "Success") { JavaScriptSerializer ser = new JavaScriptSerializer(); Dictionary <string, dynamic> ResponseDD = ser.Deserialize <Dictionary <string, dynamic> >(JsonLinq.ToString()); blotterGH = JsonConvert.DeserializeObject <List <Models.SP_GetSBPBlotterGH_Result> >(ResponseDD["Data"]); } else { TempData["DataStatus"] = "Data not available"; } } if (blotterGH.Count < 1) { ViewData["DataStatus"] = "Data Not Availavle"; } ViewBag.Title = "All Blotter Setup"; var PAccess = Session["CurrentPagesAccess"].ToString().Split('~'); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(blotterGH), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewData["isDateChangable"] = Convert.ToBoolean(PAccess[2]); ViewData["isEditable"] = Convert.ToBoolean(PAccess[3]); ViewData["IsDeletable"] = Convert.ToBoolean(PAccess[4]); return(PartialView("_BlotterGH", blotterGH)); }
public ActionResult BlotterCRRFINCON(FormCollection form) { #region Added by shakir (Currency parameter) string StartDate = ""; string EndDate = ""; var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); // Date Parameters if (form["startdate"] != null) { StartDate = form["startdate"].ToString(); ViewBag.SetStartDate = StartDate; } else { ViewBag.SetStartDate = DateTime.Now.ToString("yyyy-MM-dd"); } if (form["enddate"] != null) { EndDate = form["enddate"].ToString(); ViewBag.SetEndDate = EndDate; } else { ViewBag.SetEndDate = DateTime.Now.ToString("yyyy-MM-dd"); } #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/BlotterCRRFINCON/GetAllBlotterCRRFINCON?UserID=" + Session["UserID"].ToString() + "&BranchID=" + Session["BranchID"].ToString() + "&CurID=" + Session["SelectedCurrency"].ToString() + "&BR=" + Session["BR"].ToString() + "&StartDate=" + StartDate + "&EndDate=" + EndDate); response.EnsureSuccessStatusCode(); List <Models.SBP_BlotterCRRFINCON> blotterCRRFINCON = response.Content.ReadAsAsync <List <Models.SBP_BlotterCRRFINCON> >().Result; if (blotterCRRFINCON.Count < 1) { ViewData["DataStatus"] = "Data Not Availavle"; } ViewBag.Title = "All Blotter Setup"; var PAccess = Session["CurrentPagesAccess"].ToString().Split('~'); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(blotterCRRFINCON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewData["isDateChangable"] = Convert.ToBoolean(PAccess[2]); ViewData["isEditable"] = Convert.ToBoolean(PAccess[3]); ViewData["IsDeletable"] = Convert.ToBoolean(PAccess[4]); return(PartialView("_BlotterCRRFINCON", blotterCRRFINCON)); }
public ActionResult Create() { var ActiveAction = RouteData.Values["action"].ToString(); var ActiveController = RouteData.Values["controller"].ToString(); Session["ActiveAction"] = ActiveController; Session["ActiveController"] = ActiveAction; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(PartialView("_Create")); }
public ActionResult Update(NostroBank NostroBank) { NostroBank.UpdateDate = DateTime.Now; NostroBank.CurId = Convert.ToInt32(Session["SelectedCurrency"].ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/NostroBank/UpdateNostroBank", NostroBank); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(NostroBank), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("NostroBanks")); }
public ActionResult _Create(GazettedHoliday BlotterGH, FormCollection form) { try { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); #endregion if (ModelState.IsValid) { BlotterGH.UserID = Convert.ToInt16(Session["UserID"].ToString()); BlotterGH.createDate = DateTime.Now; ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("api/GazettedHolidays/InsertGH", BlotterGH); response.EnsureSuccessStatusCode(); if (response.IsSuccessStatusCode) { string jsonResponse = response.Content.ReadAsStringAsync().Result; var JsonLinq = JObject.Parse(jsonResponse); WebApiResponse getreponse = new WebApiResponse(); getreponse.Status = Convert.ToBoolean(JsonLinq["Status"]); getreponse.Message = JsonLinq["Message"].ToString(); getreponse.Data = JsonLinq["Data"].ToString(); if (getreponse.Status == true) { TempData["DataStatus"] = getreponse.Message; } else { TempData["DataStatus"] = getreponse.Message; } } UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterGH), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("GazettedHoliday")); } } catch (Exception ex) { } return(PartialView("_Create", BlotterGH)); }
public ActionResult UpdateUserPageRelation(UserPageRelation UPR) { try { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/UserPageRelation/UpdateUserPageRelation", UPR); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(UPR), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("UserPageRelation")); } catch (Exception ex) { } return(PartialView("_UserPageRelation")); }
public ActionResult FillSBPBlotterCRRReport(string StartDate, string EndDate) { UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/Blotter/GetLatestBlotterDTLReportDayWise?&BR=" + Session["BR"].ToString() + "&StartDate=" + StartDate + "&EndDate=" + EndDate); response.EnsureSuccessStatusCode(); List <Models.SBP_BlotterCRRReportDaysWiseBal> BlotterCRRReportsDayWiseBal = response.Content.ReadAsAsync <List <Models.SBP_BlotterCRRReportDaysWiseBal> >().Result; ViewBag.SBP_BlotterCRRReportDaysWiseBal = BlotterCRRReportsDayWiseBal; return(PartialView("_SBPBlotterCRRReportDaysWiseBal")); }
public ActionResult Update(Models.SBP_BlotterCRD BlotterCRD, FormCollection form) { BlotterCRD.UserID = Convert.ToInt16(Session["UserID"].ToString()); BlotterCRD.BID = Convert.ToInt16(Session["BranchID"].ToString()); BlotterCRD.BR = Convert.ToInt16(Session["BR"].ToString()); BlotterCRD.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString()); BlotterCRD.UpdateDate = DateTime.Now; BlotterCRD.Nostro_Account = Convert.ToInt32(form["Nostro_AccountId"].ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/BlotterCRD/UpdateCRD", BlotterCRD); response.EnsureSuccessStatusCode(); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterCRD), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("BlotterCRD")); }
// GET: BlotterBai_Muajjal public ActionResult BlotterBai_Muajjal(FormCollection form) { try { #region Added by shakir (Currency parameter) var selectCurrency = (dynamic)null; if (form["selectCurrency"] != null) { selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString()); } else { selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString()); } UtilityClass.GetSelectedCurrecy(selectCurrency); var DateVal = ""; if (form["SearchByDate"] != null) { DateVal = form["SearchByDate"].ToString(); ViewBag.DateVal = DateVal; } else { ViewBag.DateVal = DateTime.Now.ToString("yyyy-MM-dd"); } #endregion ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/BlotterBai_Muajjal/GetAllBlotterBai_Muajjal?UserID=" + Session["UserID"].ToString() + "&BranchID=" + Session["BranchID"].ToString() + "&CurID=" + Session["SelectedCurrency"].ToString() + "&BR=" + Session["BR"].ToString() + "&DateVal=" + DateVal); response.EnsureSuccessStatusCode(); List <Models.SBP_BlotterBai_Muajjal> blotterBai_Muajjal = response.Content.ReadAsAsync <List <Models.SBP_BlotterBai_Muajjal> >().Result; var PAccess = Session["CurrentPagesAccess"].ToString().Split('~'); UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(blotterBai_Muajjal), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ViewData["isDateChangable"] = Convert.ToBoolean(PAccess[2]); ViewData["isEditable"] = Convert.ToBoolean(PAccess[3]); ViewData["IsDeletable"] = Convert.ToBoolean(PAccess[4]); ViewBag.Title = "All Blotter Setup"; return(PartialView("_BlotterBai_Muajjal", blotterBai_Muajjal)); } catch (Exception ex) { throw; } }
public ActionResult Update(Models.SBP_BlotterCRRFINCON BlotterCRRFINCON) { BlotterCRRFINCON.UserID = Convert.ToInt16(Session["UserID"].ToString()); BlotterCRRFINCON.BID = Convert.ToInt16(Session["BranchID"].ToString()); BlotterCRRFINCON.BR = Convert.ToInt16(Session["BR"].ToString()); BlotterCRRFINCON.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString()); BlotterCRRFINCON.UpdateDate = DateTime.Now; ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/BlotterCRRFINCON/UpdateCRRFINCON", BlotterCRRFINCON); response.EnsureSuccessStatusCode(); //ViewData["SysCurrentDt"] = GetCurrentDT().ToString("dd-MMM-yyyy"); //ViewData["BrCode"] = BrCode; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterCRRFINCON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(RedirectToAction("BlotterCRRFINCON")); }