コード例 #1
0
        public JsonResult UpdateSupplier(string supplier_code, string supplier_name, string supplier_state, string supplier_note)
        {
            AjaxResultModel Result = new AjaxResultModel();

            try
            {
                TB_SUPPLIERS t = Suppliers_Service.GetById(supplier_code);
                t.SupplierName  = supplier_name;
                t.SupplierState = supplier_state;
                t.SupplierNote  = supplier_note;

                if (Suppliers_Service.Update(t))
                {
                    Result.Code   = 000;
                    Result.Result = "Thành công";
                }
                else
                {
                    Result.Code   = 001;
                    Result.Result = "Không thành công";
                }
            }
            catch (Exception Ex)
            {
                Result.Code   = 2000;
                Result.Result = "Có lỗi xảy ra. Vui lòng thử lại sau hoặc liên hệ với người quản trị.";
                CORE.Helpers.IOHelper.WriteLog(StartUpPath, IpAddress, "UpdatePassword :", Ex.Message, Ex.ToString());
            }

            return(Json(Result));
        }
コード例 #2
0
        public PartialViewResult _SupplierListDetail(string supplierCode = "")
        {
            int height = (int)(Request.Browser.ScreenPixelsHeight * 0.85);

            TB_SUPPLIERS sup = Suppliers_Service.GetById(supplierCode);

            ViewBag.Supplier = sup;

            return(PartialView(height));
        }
コード例 #3
0
 public bool Insert(TB_SUPPLIERS supplier)
 {
     return(new TB_SUPPLIERSSql().Insert(supplier, true));
 }
コード例 #4
0
 public bool Update(TB_SUPPLIERS supplier)
 {
     return(new TB_SUPPLIERSSql().Update(supplier));
 }