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


                UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
                SBP_BlotterOpeningBalance model = new SBP_BlotterOpeningBalance();
                return(PartialView("_Create", model));
            }
            catch (Exception ex) { }

            return(PartialView("_Create"));
        }
        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_BlotterOpeningBalance model = new SBP_BlotterOpeningBalance();

            return(PartialView("_Create", model));
        }
        public ActionResult _Create(SBP_BlotterOpeningBalance BlotterOpenBal, 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)
                {
                    if (Session["BR"].ToString() == "01")
                    {
                        BlotterOpenBal.DataType = "SBP";
                    }
                    BlotterOpenBal.BalDate    = BlotterOpenBal.BalDate;
                    BlotterOpenBal.UserID     = Convert.ToInt16(Session["UserID"].ToString());
                    BlotterOpenBal.BID        = Convert.ToInt16(Session["BranchID"].ToString());
                    BlotterOpenBal.BR         = Convert.ToInt16(Session["BR"].ToString());
                    BlotterOpenBal.CurID      = Convert.ToInt16(Session["SelectedCurrency"].ToString());
                    BlotterOpenBal.CreateDate = DateTime.Now;
                    ServiceRepository   serviceObj = new ServiceRepository();
                    HttpResponseMessage response   = serviceObj.PostResponse("api/BlotterOpenBal/InsertOpenBal", BlotterOpenBal);
                    response.EnsureSuccessStatusCode();
                    UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterOpenBal), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
                    return(RedirectToAction("OpeningBalance"));
                }
            }
            catch (Exception ex) { }
            return(PartialView("_Create", BlotterOpenBal));
        }