示例#1
0
        public ActionResult Edit(int id)
        {
            RptCompanyOP op   = new RptCompanyOP();
            var          data = op.GetData(id);

            return(View(data));
        }
示例#2
0
        public ActionResult Create(RPT_Company data)
        {
            data.CreateTime = DateTime.Now;
            data.CreateUser = this.UserID;

            RptCompanyOP op = new  RptCompanyOP();
            int          i  = op.Create(data);

            return(Json(new { state = "success" }));
        }
示例#3
0
        //
        // GET: /User/

        public ActionResult Index(string txtSearch = "")
        {
            RptCompanyOP op = new RptCompanyOP();

            int total;

            var data = op.GetList(txtSearch, PageNumber, ConstInfo.PAGE_SIZE, out total);

            ViewBag.TotalRecords = total;

            return(View(data));
        }
示例#4
0
        public ActionResult Edit(RPT_Company data)
        {
            if (!string.IsNullOrEmpty(data.CompanyCode))
            {
                RptCompanyOP op = new RptCompanyOP();

                op.Update(data);
                return(Json(new { state = "success" }));
            }
            else
            {
                return(Json(new { state = "error" }));
            }
        }