示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }
示例#8
0
        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);
        }
示例#9
0
 /// <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);
     }
 }
示例#10
0
 /// <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);
     }
 }
示例#11
0
 /// <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));
 }
示例#12
0
 /// <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));
 }
示例#13
0
 /// <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 + "'"));
 }
示例#14
0
 public bool UpdateProductDetailsStatus(string productdetailid, EnumStatus status, string operateIP, string operateID)
 {
     return(CommonBusiness.Update("ProductDetail", "Status", (int)status, " ProductDetailID='" + productdetailid + "'"));
 }
示例#15
0
 public bool UpdateProductIsNew(string productid, bool isNew, string operateIP, string operateID)
 {
     return(CommonBusiness.Update("Products", "IsNew", isNew ? "1" : "0", " ProductID='" + productid + "'"));
 }
示例#16
0
 public static bool DeleteClient(string clientID)
 {
     return(CommonBusiness.Update("Clients", "Status", 9, " ClientID='" + clientID + "'"));
 }
示例#17
0
 public static bool UpdateCartBatch(string autoid, string batch, string userid)
 {
     return(CommonBusiness.Update("ShoppingCart", "BatchCode", batch, "AutoID=" + autoid));
 }
示例#18
0
        public bool DeleteContact(string contactid, string ip, string userid, string agentid)
        {
            bool bl = CommonBusiness.Update("Contact", "Status", 9, "ContactID='" + contactid + "'");

            return(bl);
        }
示例#19
0
 public bool UpdateProductStatus(string productid, EnumStatus status, string operateIP, string operateID)
 {
     return(CommonBusiness.Update("Products", "Status", ((int)status).ToString(), " ProductID='" + productid + "'"));
 }
示例#20
0
        public bool DeleteReply(string replyid)
        {
            bool bl = CommonBusiness.Update("CustomerReply", "Status", 9, "ReplyID='" + replyid + "'");

            return(bl);
        }
示例#21
0
 public bool UpdateProductIsRecommend(string productid, bool isRecommend, string operateIP, string operateID)
 {
     return(CommonBusiness.Update("Products", "IsRecommend", isRecommend ? "1" : "0", " ProductID='" + productid + "'"));
 }
示例#22
0
 /// <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 + "'"));
 }
示例#23
0
 public bool UpdateProviderStatus(string providerid, EnumStatus status, string ip, string operateid)
 {
     return(CommonBusiness.Update("Providers", "Status", (int)status, "ProviderID='" + providerid + "'"));
 }
示例#24
0
 /// <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 + "'"));
 }