public void AddSupplier() { int Supplier_ID = tools.CheckInt(Request.Form["Supplier_ID"]); string Supplier_Name = tools.CheckStr(Request.Form["Supplier_Name"]); string Supplier_Address = tools.CheckStr(Request.Form["Supplier_Address"]); string Supplier_Tel = tools.CheckStr(Request.Form["Supplier_Tel"]); string Supplier_Contact = tools.CheckStr(Request.Form["Supplier_Contact"]); if (Supplier_Name.Length == 0 || Supplier_Address.Length == 0 || Supplier_Tel.Length == 0) { Public.Msg("error", "错误信息", "请填写供应商名称/地址/电话", false, "{back}"); return; } string SqlAdd = "INSERT INTO SCM_Supplier (Supplier_Name, Supplier_Address, Supplier_Tel, Supplier_Contact)"; SqlAdd += "VALUES('" + Supplier_Name + "', '" + Supplier_Address + "', '" + Supplier_Tel + "', '" + Supplier_Contact + "')"; try { DBHelper.ExecuteNonQuery(SqlAdd); } catch (Exception ex) { throw ex; } Public.Msg("positive", "操作成功", "操作成功", true, "supplier_list.aspx"); }
public void AddFriendlyLinkCate() { int FriendlyLink_Cate_ID = tools.CheckInt(Request.Form["FriendlyLink_Cate_ID"]); string FriendlyLink_Cate_Name = tools.CheckStr(Request.Form["FriendlyLink_Cate_Name"]); int FriendlyLink_Cate_Sort = tools.CheckInt(Request.Form["FriendlyLink_Cate_Sort"]); if (FriendlyLink_Cate_Name == null || FriendlyLink_Cate_Name == "") { Public.Msg("error", "错误信息", "请填写分类名称", false, "{back}"); return; } FriendlyLinkCateInfo entity = new FriendlyLinkCateInfo(); entity.FriendlyLink_Cate_ID = FriendlyLink_Cate_ID; entity.FriendlyLink_Cate_Name = FriendlyLink_Cate_Name; entity.FriendlyLink_Cate_Sort = FriendlyLink_Cate_Sort; entity.FriendlyLink_Cate_Site = Public.GetCurrentSite(); if (MyBLL.AddFriendlyLinkCate(entity, Public.GetUserPrivilege())) { Public.Msg("positive", "操作成功", "操作成功", true, "friendlylink_cate_list.aspx"); } else { Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}"); } }
//保存店铺对应类别 public virtual void SaveShopCategory(int Shop_ID, string[] extends) { ArrayList sqlList = new ArrayList(extends.GetLength(0)); DBHelper.ExecuteNonQuery("DELETE FROM Supplier_Shop_Category WHERE Shop_Cate_ShopID =" + Shop_ID); foreach (string cateid in extends) { if (Tools.CheckInt(cateid) > 0) { sqlList.Add("INSERT INTO Supplier_Shop_Category (Shop_Cate_CateID, Shop_Cate_ShopID) VALUES (" + cateid + ", " + Shop_ID + ")"); } } DBHelper.ExecuteNonQuery(sqlList); sqlList = null; }
public void ProductNotifySend() { int Product_Notify_ID = tools.CheckInt(Request.QueryString["Notify_ID"]); ProductNotifyInfo entity = MyBLL.GetProductNotifyByID(Product_Notify_ID, Public.GetUserPrivilege()); if (entity != null) { ProductInfo productinfo = MyProduct.GetProductByID(entity.Product_Notify_ProductID, Public.GetUserPrivilege()); if (productinfo != null) { Sendmail(entity.Product_Notify_Email, Application["site_name"].ToString() + "到货通知", productinfo.Product_Name + "已到货!", Application["site_name"].ToString() + "通知您," + productinfo.Product_Name + "已到货,期待您的选购!"); entity.Product_Notify_IsNotify = 1; MyBLL.EditProductNotify(entity, Public.GetUserPrivilege()); } } Public.Msg("positive", "操作成功", "操作成功", true, "Product_Notify_list.aspx"); }
public void AddRBACPrivilege() { int RBAC_Privilege_ResourceID = tools.CheckInt(Request.Form["RBAC_Privilege_ResourceID"]); string RBAC_Privilege_Name = tools.CheckStr(Request.Form["RBAC_Privilege_Name"]); int RBAC_Privilege_IsActive = tools.CheckInt(Request.Form["RBAC_Privilege_IsActive"]); RBACPrivilegeInfo entity = new RBACPrivilegeInfo(); entity.RBAC_Privilege_ID = "0"; entity.RBAC_Privilege_ResourceID = RBAC_Privilege_ResourceID; entity.RBAC_Privilege_Name = RBAC_Privilege_Name; entity.RBAC_Privilege_IsActive = 1; entity.RBAC_Privilege_Addtime = DateTime.Now; if (MyBLL.AddRBACPrivilege(entity, Public.GetUserPrivilege())) { Public.Msg("positive", "操作成功", "操作成功", true, "privilege_list.aspx"); } else { Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}"); } }