public bool UpdateCustomerMark(string customerid, int mark, string operateid, string ip, string agentid, string clientid) { bool bl = CommonBusiness.Update("Customer", "Mark", mark, "CustomerID='" + customerid + "'"); if (bl) { string msg = "标记客户颜色"; LogBusiness.AddLog(customerid, EnumLogObjectType.Customer, msg, operateid, ip, mark.ToString(), agentid, clientid); } return(bl); }
public bool UpdateBrandStatus(string brandID, EnumStatus status, string operateIP, string operateID) { bool bl = CommonBusiness.Update("Brand", "Status", ((int)status).ToString(), " BrandID='" + brandID + "'"); if (bl) { string message = "编辑品牌状态为:" + CommonBusiness.GetEnumDesc(status); LogBusiness.AddOperateLog(operateID, "ProductsBusiness.UpdateBrandStatus", EnumLogType.Update, EnumLogModules.Stock, EnumLogEntity.Brand, brandID, message, operateIP); } return(bl); }
public bool UpdateCustomerStatus(string customerid, EnumCustomStatus status, string operateid, string ip, string agentid, string clientid) { bool bl = CommonBusiness.Update("Customer", "Status", (int)status, "CustomerID='" + customerid + "'"); if (bl) { var model = CommonBusiness.GetEnumDesc(status); string msg = "客户状态更换为:" + model; LogBusiness.AddLog(customerid, EnumLogObjectType.Customer, msg, operateid, ip, status.ToString(), agentid, clientid); } return(bl); }
public bool UpdateTeam(string teamid, string name, string userid, string ip, string agentid, string clientid) { var model = GetTeamByID(teamid, agentid); bool bl = CommonBusiness.Update("Teams", "TeamName", name, "TeamID='" + teamid + "'"); if (bl) { model.TeamName = name; } return(bl); }
public bool DeleteOrderType(string typeid, string userid, string ip, string agentid, string clientid) { var model = GetOrderTypeByID(typeid, agentid, clientid); bool bl = CommonBusiness.Update("OrderType", "Status", "9", "TypeID='" + typeid + "'"); if (bl) { OrderTypes[clientid].Remove(model); } return(bl); }
public bool DeleteStageItem(string itemid, string stageid, string userid, string ip, string agentid, string clientid) { var model = GetCustomStageByID(stageid, agentid, clientid); bool bl = CommonBusiness.Update("StageItem", "Status", "9", "ItemID='" + itemid + "'"); if (bl) { var item = model.StageItem.Where(m => m.ItemID == itemid).FirstOrDefault(); model.StageItem.Remove(item); } return(bl); }
public bool UpdateStageItem(string itemid, string name, string stageid, string userid, string ip, string agentid, string clientid) { var model = GetCustomStageByID(stageid, agentid, clientid); bool bl = CommonBusiness.Update("StageItem", "ItemName", name, "ItemID='" + itemid + "'"); if (bl) { var item = model.StageItem.Where(m => m.ItemID == itemid).FirstOrDefault(); item.ItemName = name; } return(bl); }
public bool UpdateWareHouseStatus(string id, EnumStatus status, string operateid, string clientid) { bool bl = CommonBusiness.Update("WareHouse", "Status", (int)status, " WareID='" + id + "'"); if (bl) { var model = GetWareByID(id, clientid); if (status == EnumStatus.Delete) { WareHouses[clientid].Remove(model); } else { model.Status = (int)status; } } return(bl); }
/// <summary> /// 编辑部门状态 /// </summary> /// <param name="departid">部门ID</param> /// <param name="status">状态</param> /// <param name="operateid">操作人</param> /// <param name="operateip">操作IP</param> /// <returns></returns> public EnumResultStatus UpdateDepartmentStatus(string departid, EnumStatus status, string operateid, string operateip) { if (status == EnumStatus.Delete) { object count = CommonBusiness.Select(" UserDepart ", " count(0) ", " DepartID='" + departid + "' and Status=1 "); if (Convert.ToInt32(count) > 0) { return(EnumResultStatus.Exists); } } if (CommonBusiness.Update(" Department ", " Status ", (int)status, " DepartID='" + departid + "'")) { return(EnumResultStatus.Success); } else { return(EnumResultStatus.Failed); } }
/// <summary> /// 编辑部门状态 /// </summary> /// <param name="departid">部门ID</param> /// <param name="status">状态</param> /// <param name="operateid">操作人</param> /// <param name="operateip">操作IP</param> /// <returns></returns> public EnumResultStatus UpdateDepartmentStatus(string departid, EnumStatus status, string operateid, string operateip, string agentid) { if (status == EnumStatus.Delete) { object count = CommonBusiness.Select("UserDepart", "count(0)", "DepartID='" + departid + "' and Status=1"); if (Convert.ToInt32(count) > 0) { return(EnumResultStatus.Exists); } } if (CommonBusiness.Update("Department", "Status", (int)status, "DepartID='" + departid + "' and AgentID='" + agentid + "'")) { var model = GetDepartments(agentid).Where(d => d.DepartID == departid).FirstOrDefault(); model.Status = (int)status; return(EnumResultStatus.Success); } else { return(EnumResultStatus.Failed); } }
/// <summary> /// 作废单据 /// </summary> /// <param name="docid"></param> /// <param name="userid"></param> /// <param name="operateip"></param> /// <param name="clientid"></param> /// <returns></returns> public bool InvalidDoc(string docid, string userid, string operateip, string clientid) { return(CommonBusiness.Update("StorageDoc", "Status", (int)EnumDocStatus.Invalid, "DocID='" + docid + "' and status=" + (int)EnumDocStatus.Normal)); }
/// <summary> /// 编辑购物车产品数量 /// </summary> /// <param name="autoid"></param> /// <param name="quantity"></param> /// <returns></returns> public static bool UpdateCartQuantity(string autoid, int quantity, string userid, string clientid) { return(CommonBusiness.Update("ShoppingCart", "Quantity", quantity, "AutoID=" + autoid)); }
/// <summary> /// 删除库别 /// </summary> /// <param name="id">库别ID</param> /// <param name="operateid">操作人</param> /// <param name="clientid">客户端ID</param> /// <returns></returns> public bool DeleteWarehouseType(string id, string operateid, string clientid) { return(CommonBusiness.Update("WareHouseType", "Status", (int)CloudSalesEnum.EnumStatus.Delete, " TypeID='" + id + "'")); }
public bool UpdateProductDetailsStatus(string productdetailid, EnumStatus status, string operateIP, string operateID) { return(CommonBusiness.Update("ProductDetail", "Status", (int)status, " ProductDetailID='" + productdetailid + "'")); }
public bool UpdateProductIsNew(string productid, bool isNew, string operateIP, string operateID) { return(CommonBusiness.Update("Products", "IsNew", isNew ? "1" : "0", " ProductID='" + productid + "'")); }
public static bool DeleteClient(string clientID) { return(CommonBusiness.Update("Clients", "Status", 9, " ClientID='" + clientID + "'")); }
public static bool UpdateCartBatch(string autoid, string batch, string userid) { return(CommonBusiness.Update("ShoppingCart", "BatchCode", batch, "AutoID=" + autoid)); }
public bool DeleteContact(string contactid, string ip, string userid, string agentid) { bool bl = CommonBusiness.Update("Contact", "Status", 9, "ContactID='" + contactid + "'"); return(bl); }
public bool UpdateProductStatus(string productid, EnumStatus status, string operateIP, string operateID) { return(CommonBusiness.Update("Products", "Status", ((int)status).ToString(), " ProductID='" + productid + "'")); }
public bool DeleteReply(string replyid) { bool bl = CommonBusiness.Update("CustomerReply", "Status", 9, "ReplyID='" + replyid + "'"); return(bl); }
public bool UpdateProductIsRecommend(string productid, bool isRecommend, string operateIP, string operateID) { return(CommonBusiness.Update("Products", "IsRecommend", isRecommend ? "1" : "0", " ProductID='" + productid + "'")); }
/// <summary> /// 编辑仓库状态 /// </summary> /// <param name="id"></param> /// <param name="status"></param> /// <param name="operateid"></param> /// <param name="clientid"></param> /// <returns></returns> public bool UpdateWareHouseStatus(string id, EnumStatus status, string operateid, string clientid) { return(CommonBusiness.Update("WareHouse", "Status", (int)status, " WareID='" + id + "'")); }
public bool UpdateProviderStatus(string providerid, EnumStatus status, string ip, string operateid) { return(CommonBusiness.Update("Providers", "Status", (int)status, "ProviderID='" + providerid + "'")); }
/// <summary> /// 编辑货位状态 /// </summary> /// <param name="id"></param> /// <param name="status"></param> /// <param name="operateid"></param> /// <param name="clientid"></param> /// <returns></returns> public bool UpdateDepotSeatStatus(string id, EnumStatus status, string operateid, string clientid) { return(CommonBusiness.Update("DepotSeat", "Status", (int)status, " DepotID='" + id + "'")); }