Ejemplo n.º 1
0
        public CommonOutput savebp1edit(savebp1model req)
        {
            CommonOutput output = new CommonOutput();

            try
            {
                using (var objDB = new AdityamineralsEntities())
                {
                    SqlParameter state       = new SqlParameter("@state", req.state);
                    SqlParameter statecode   = new SqlParameter("@statecode", req.statecode);
                    SqlParameter date        = new SqlParameter("@date", req.date);
                    SqlParameter bpname      = new SqlParameter("@bpname", req.bpname);
                    SqlParameter bpaddress   = new SqlParameter("@bpaddress", req.bpaddress);
                    SqlParameter bpgstin     = new SqlParameter("@bpgstin", req.bpgstin);
                    SqlParameter bpstate     = new SqlParameter("@bpstate", req.bpstate);
                    SqlParameter bpstatecode = new SqlParameter("@bpstatecode", req.bpstatecode);
                    SqlParameter spname      = new SqlParameter("@spname", req.spname);
                    SqlParameter spaddress   = new SqlParameter("@spaddress", req.spaddress);
                    SqlParameter spgstin     = new SqlParameter("@spgstin", req.spgstin);
                    SqlParameter spstate     = new SqlParameter("@spstate", req.spstate);
                    SqlParameter spstatecode = new SqlParameter("@spstatecode", req.spstatecode);
                    output = objDB.Database.SqlQuery <CommonOutput>("[dbo].[ADM_SAVEBP1EDIT] @state,@statecode,@date,@bpname,@bpaddress,@bpgstin,@bpstate,@bpstatecode,@spname,@spaddress,@spgstin,@spstate,@spstatecode",
                                                                    state, statecode, date, bpname, bpaddress, bpgstin, bpstate, bpstatecode, spname, spaddress, spgstin, spstate, spstatecode).FirstOrDefault();
                }
            }
            catch (Exception ex)
            {
                output.StatusCode = 500;
                output.Message    = ex.Message;
            }
            return(output);
        }
Ejemplo n.º 2
0
        public CommonOutput savebp1(savebp1model req)
        {
            CommonOutput output = new CommonOutput();

            try
            {
                DashbordDL obj = new DashbordDL();

                output = obj.savebp1(req);
            }
            catch (Exception ex)
            {
            }
            return(output);
        }
Ejemplo n.º 3
0
        public dynamic savebp11edit(savebp1model req)
        {
            CommonOutput output = new CommonOutput();

            if (Session["UserName"] != null)
            {
                DashboardBL bl = new DashboardBL();
                output = bl.savebp1edit(req);
            }
            else
            {
                return(RedirectToAction("Login", "Login"));
            }
            return(Json(output, JsonRequestBehavior.AllowGet));
        }