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() { SBP_BlotterRECON model = new SBP_BlotterRECON(); 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"] = ActiveController; Session["ActiveController"] = ActiveAction; if (ModelState.IsValid) { // model.CreateDate = DateTime.Now.Date; ViewBag.RECONNostroBanks = GetAllNostroBanks(); } } catch (Exception ex) { } return(PartialView("_Create", model)); }