예제 #1
0
        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_BlotterBai_Muajjal model = new SBP_BlotterBai_Muajjal();
            try
            {
                UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), "", this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
                model.ValueDate = DateTime.Now.Date;
            }
            catch (Exception ex) { }

            return(PartialView("_Create", model));
        }
예제 #2
0
        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_BlotterBai_Muajjal model = new SBP_BlotterBai_Muajjal();

            model.ValueDate = DateTime.Now.Date;



            return(PartialView("_Create", model));
        }
예제 #3
0
        public ActionResult _Create(SBP_BlotterBai_Muajjal 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);
                #endregion

                if (ModelState.IsValid)
                {
                    BlotterBai_Muajjal.BM_OutFLow = UC.CheckNegativeValue(BlotterBai_Muajjal.BM_OutFLow);
                    BlotterBai_Muajjal.UserID     = Convert.ToInt16(Session["UserID"].ToString());
                    BlotterBai_Muajjal.BID        = Convert.ToInt16(Session["BranchID"].ToString());
                    BlotterBai_Muajjal.BR         = Convert.ToInt16(Session["BR"].ToString());
                    BlotterBai_Muajjal.CurID      = Convert.ToInt16(Session["SelectedCurrency"].ToString());
                    BlotterBai_Muajjal.CreateDate = DateTime.Now;
                    ServiceRepository   serviceObj = new ServiceRepository();
                    HttpResponseMessage response   = serviceObj.PostResponse("api/BlotterBai_Muajjal/InsertBai_Muajjal", BlotterBai_Muajjal);
                    response.EnsureSuccessStatusCode();
                    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());
                    return(RedirectToAction("BlotterBai_Muajjal"));
                }
            }
            catch (Exception ex) { }
            return(PartialView("_Create", BlotterBai_Muajjal));
        }