Exemplo n.º 1
0
        public ActionResult Create(FormCollection form)
        {
            SBP_BlotterTBO model = new SBP_BlotterTBO();

            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

                if (ModelState.IsValid)
                {
                    model.TBO_Date = DateTime.Now.Date;
                    ViewBag.TBOTransactionTitles = GetAllTBOTransactionTitles();
                }
            }
            catch (Exception ex) { }

            return(PartialView("_Create", model));
        }
Exemplo n.º 2
0
        public ActionResult _Create(SBP_BlotterTBO BlotterTBO, 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)
                {
                    BlotterTBO.TBO_OutFLow = UC.CheckNegativeValue(BlotterTBO.TBO_OutFLow);
                    BlotterTBO.UserID      = Convert.ToInt16(Session["UserID"].ToString());
                    BlotterTBO.BR          = Convert.ToInt16(Session["BR"].ToString());
                    BlotterTBO.BID         = Convert.ToInt16(Session["BranchID"].ToString());
                    BlotterTBO.CurID       = Convert.ToInt16(Session["SelectedCurrency"].ToString());
                    BlotterTBO.CreateDate  = DateTime.Now;
                    ServiceRepository   serviceObj = new ServiceRepository();
                    HttpResponseMessage response   = serviceObj.PostResponse("api/BlotterTBO/InsertTBO", BlotterTBO);
                    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(BlotterTBO), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
                    return(RedirectToAction("BlotterTBO"));
                }
                else
                {
                    ViewBag.TBOTransactionTitles = GetAllTBOTransactionTitles();
                }
            }
            catch (Exception ex) { }
            return(PartialView("_Create", BlotterTBO));
        }
Exemplo n.º 3
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_BlotterTBO model = new SBP_BlotterTBO();

            try
            {
                if (ModelState.IsValid)
                {
                    model.TBO_Date = DateTime.Now.Date;
                    //ViewData["SysCurrentDt"] = GetCurrentDT().ToString("dd-MMM-yyyy");
                    // ViewData["BrCode"] = BrCode;
                    ViewBag.TBOTransactionTitles = GetAllTBOTransactionTitles();
                }
            }
            catch (Exception ex) { }
            return(PartialView("_Create", model));
        }