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 ViewData["BranchName"] = Session["BranchName"].ToString(); SBP_BlotterBreakups BlotterBreakups = new SBP_BlotterBreakups(); BlotterBreakups.FoodPayment_inFlow = 0; BlotterBreakups.HOKRemittance_inFlow = 0; BlotterBreakups.Miscellaneous_inflow = 0; BlotterBreakups.SBPChequeDeposite_inflow = 0; BlotterBreakups.ERF_inflow = 0; BlotterBreakups.CashWithdrawbySBPCheques_outFlow = 0; BlotterBreakups.DSC_outFlow = 0; BlotterBreakups.ERF_outflow = 0; BlotterBreakups.Miscellaneous_outflow = 0; BlotterBreakups.RemitanceToHOK_outFlow = 0; BlotterBreakups.SBPCheqGivenToOtherBank_outFlow = 0; return(PartialView("_Create", BlotterBreakups)); }
public ActionResult Update(SBP_BlotterBreakups BlotterBreakups) { BlotterBreakups.CashWithdrawbySBPCheques_outFlow = UC.CheckNegativeValue(BlotterBreakups.CashWithdrawbySBPCheques_outFlow); BlotterBreakups.ERF_outflow = UC.CheckNegativeValue(BlotterBreakups.ERF_outflow); BlotterBreakups.DSC_outFlow = UC.CheckNegativeValue(BlotterBreakups.DSC_outFlow); BlotterBreakups.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString()); BlotterBreakups.RemitanceToHOK_outFlow = UC.CheckNegativeValue(BlotterBreakups.RemitanceToHOK_outFlow); BlotterBreakups.SBPCheqGivenToOtherBank_outFlow = UC.CheckNegativeValue(BlotterBreakups.SBPCheqGivenToOtherBank_outFlow); BlotterBreakups.Miscellaneous_outflow = UC.CheckNegativeValue(BlotterBreakups.Miscellaneous_outflow); BlotterBreakups.UpdateDate = DateTime.Now; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterBreakups), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PutResponse("api/BlotterBreakups/UpdateBlotterBreakups", BlotterBreakups); response.EnsureSuccessStatusCode(); return(RedirectToAction("BlotterBreakups")); }
public ActionResult _Create(SBP_BlotterBreakups BlotterBreakups, 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) { BlotterBreakups.CashWithdrawbySBPCheques_outFlow = UC.CheckNegativeValue(BlotterBreakups.CashWithdrawbySBPCheques_outFlow); BlotterBreakups.ERF_outflow = UC.CheckNegativeValue(BlotterBreakups.ERF_outflow); BlotterBreakups.DSC_outFlow = UC.CheckNegativeValue(BlotterBreakups.DSC_outFlow); BlotterBreakups.RemitanceToHOK_outFlow = UC.CheckNegativeValue(BlotterBreakups.RemitanceToHOK_outFlow); BlotterBreakups.SBPCheqGivenToOtherBank_outFlow = UC.CheckNegativeValue(BlotterBreakups.SBPCheqGivenToOtherBank_outFlow); BlotterBreakups.Miscellaneous_outflow = UC.CheckNegativeValue(BlotterBreakups.Miscellaneous_outflow); BlotterBreakups.UserID = Convert.ToInt16(Session["UserID"].ToString()); BlotterBreakups.BR = Convert.ToInt16(Session["BR"].ToString()); BlotterBreakups.BID = Convert.ToInt16(Session["BranchID"].ToString()); BlotterBreakups.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString()); BlotterBreakups.BreakupDate = DateTime.Now; BlotterBreakups.CreateDate = DateTime.Now; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterBreakups), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("api/BlotterBreakups/InsertBlotterBreakups", BlotterBreakups); response.EnsureSuccessStatusCode(); return(RedirectToAction("BlotterBreakups")); } } catch (Exception ex) { } return(PartialView("_Create", BlotterBreakups)); }
public ActionResult Create() { var ActiveAction = RouteData.Values["action"].ToString(); var ActiveController = RouteData.Values["controller"].ToString(); Session["ActiveAction"] = ActiveController; Session["ActiveController"] = ActiveAction; ViewData["BranchName"] = Session["BranchName"].ToString(); SBP_BlotterBreakups BlotterBreakups = new SBP_BlotterBreakups(); BlotterBreakups.FoodPayment_inFlow = 0; BlotterBreakups.HOKRemittance_inFlow = 0; BlotterBreakups.Miscellaneous_inflow = 0; BlotterBreakups.SBPChequeDeposite_inflow = 0; BlotterBreakups.ERF_inflow = 0; BlotterBreakups.CashWithdrawbySBPCheques_outFlow = 0; BlotterBreakups.DSC_outFlow = 0; BlotterBreakups.ERF_outflow = 0; BlotterBreakups.Miscellaneous_outflow = 0; BlotterBreakups.RemitanceToHOK_outFlow = 0; BlotterBreakups.SBPCheqGivenToOtherBank_outFlow = 0; return(PartialView("_Create", BlotterBreakups)); }