예제 #1
0
        public bool AuditProductIsPublic(string productid, int ispublic, string operateIP, string operateID)
        {
            bool bl = CommonBusiness.Update("Products", "IsPublic", ispublic, " ProductID='" + productid + "' and IsPublic=1");

            if (bl)
            {
                string msg = ispublic == 2 ? "通过材料公开申请" : "驳回材料公开申请";
                LogBusiness.AddLog(productid, EnumLogObjectType.Product, msg, operateID, operateIP, "", "");
            }
            return(bl);
        }
예제 #2
0
        public bool DeleteProductIsPublic(string productid, string operateIP, string operateID)
        {
            bool bl = CommonBusiness.Update("Products", "IsPublic", 4, " ProductID='" + productid + "' and IsPublic=2");

            if (bl)
            {
                string msg = "撤销材料公开状态";
                LogBusiness.AddLog(productid, EnumLogObjectType.Product, msg, operateID, operateIP, "", "");
            }
            return(bl);
        }
예제 #3
0
        public static bool UpdateTaskColorMark(string taskid, int mark, string operateid, string ip, string clientid)
        {
            bool bl = CommonBusiness.Update("OrderTask", "ColorMark", mark, "TaskID='" + taskid + "'");

            if (bl)
            {
                string msg = "标记任务颜色";
                LogBusiness.AddLog(taskid, EnumLogObjectType.OrderTask, msg, operateid, ip, mark.ToString(), clientid);
            }
            return(bl);
        }
예제 #4
0
        public bool UpdateTeam(string teamid, string name, string userid, string ip, string clientid)
        {
            bool bl = CommonBusiness.Update("Teams", "TeamName", name, "TeamID='" + teamid + "'");

            if (bl)
            {
                var model = GetTeamByID(teamid, clientid);
                model.TeamName = name;
            }
            return(bl);
        }
예제 #5
0
        public bool UpdateDepotSeatStatus(string id, string wareid, EnumStatus status, string operateid, string clientid)
        {
            bool bl = CommonBusiness.Update("DepotSeat", "Status", (int)status, " DepotID='" + id + "'");

            if (bl)
            {
                var model = GetDepotByID(id, wareid, clientid);
                model.Status = (int)status;
            }
            return(bl);
        }
예제 #6
0
        public bool UpdateCustomerMark(string customerid, int mark, string operateid, string ip, string clientid)
        {
            bool bl = CommonBusiness.Update("Customer", "Mark", mark, "CustomerID='" + customerid + "'");

            if (bl)
            {
                var    color = SystemBusiness.BaseBusiness.GetLableColorColorID(clientid, mark, EnumMarkType.Customer);
                string msg   = color != null ? "客户更换标签:" + color.ColorName : "标记客户标签";
                LogBusiness.AddLog(customerid, EnumLogObjectType.Customer, msg, operateid, ip, mark.ToString(), clientid);
            }
            return(bl);
        }
예제 #7
0
        public bool UpdateCustomerStatus(string customerid, EnumCustomStatus status, string operateid, string ip, 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(), clientid);
            }
            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
 public EnumResultStatus UpdateDepartmentStatus(string departid, EnumStatus status, string operateid, string operateip, string clientid)
 {
     if (status == EnumStatus.Delete)
     {
         object count = CommonBusiness.Select("Users", "count(0)", "DepartID='" + departid + "' and Status=1");
         if (Convert.ToInt32(count) > 0)
         {
             return(EnumResultStatus.Exists);
         }
     }
     if (CommonBusiness.Update("Department", "Status", (int)status, "DepartID='" + departid + "'"))
     {
         var model = GetDepartments(clientid).Where(d => d.DepartID == departid).FirstOrDefault();
         model.Status = (int)status;
         return(EnumResultStatus.Success);
     }
     else
     {
         return(EnumResultStatus.Failed);
     }
 }
예제 #10
0
        public static bool DeleteReply(EnumLogObjectType type, string replyid)
        {
            string tablename = "";

            switch (type)
            {
            case EnumLogObjectType.Customer:
                tablename = "CustomerReply";
                break;

            case EnumLogObjectType.OrderTask:
                tablename = "TaskReply";
                break;

            case EnumLogObjectType.Orders:
                tablename = "OrderReply";
                break;
            }

            bool bl = CommonBusiness.Update(tablename, "Status", 9, "ReplyID='" + replyid + "'");

            return(bl);
        }
예제 #11
0
        public bool DeleteContact(string contactid, string ip, string userid)
        {
            bool bl = CommonBusiness.Update("Contact", "Status", 9, "ContactID='" + contactid + "'");

            return(bl);
        }
예제 #12
0
 public bool UpdateProductDetailsStatus(string productdetailid, EnumStatus status, string operateIP, string operateID)
 {
     return(CommonBusiness.Update("ProductDetail", "Status", (int)status, " ProductDetailID='" + productdetailid + "'"));
 }
예제 #13
0
 public bool UpdateProductStatus(string productid, EnumStatus status, string operateIP, string operateID)
 {
     return(CommonBusiness.Update("Products", "Status", ((int)status).ToString(), " ProductID='" + productid + "'"));
 }
예제 #14
0
 public static bool UpdateCartBatch(string autoid, string batch, string userid)
 {
     return(CommonBusiness.Update("ShoppingCart", "BatchCode", batch, "AutoID=" + autoid));
 }
예제 #15
0
 public bool UpdateProviderStatus(string providerid, EnumStatus status, string ip, string operateid)
 {
     return(CommonBusiness.Update("Providers", "Status", (int)status, "ProviderID='" + providerid + "'"));
 }