示例#1
0
 /// <summary>管理员建立新供应商操作的处理
 /// </summary>
 /// <returns>建立新供应商记录的处理结果View</returns>
 public ActionResult NewVendor(VendorItem vendor)
 {
     if (VendorManager.AddNewVendor(vendor))
     {
         return(Content(WebResult <string> .SuccessResult.ResponseString));
     }
     return(Content(WebResult <string> .NormalErrorResult.ResponseString));
 }
        protected void btnSaveVendor_onclick(object sender, EventArgs e)
        {
            vendorManager = new VendorManager();
            Vendor vendor = new Vendor();

            vendor.Name           = txtVendortName.Text;
            vendor.Email          = txtVendorEmail.Text;
            vendor.Address        = txtVendorAddress.Text;
            vendor.Phone          = txtVendorPhone.Text;
            lblVendorsInsert.Text = vendorManager.AddNewVendor(vendor);
            ClearTxtBox();
            GetAllVendors();
        }