/// <summary> /// 更新一条数据 /// </summary> public bool ClostAdd(Maticsoft.Model.CustomLosts model) { Maticsoft.Model.CustomLosts list = new BLL.CustomLosts().GetModel(model.CLID); model.CLEnterDate = DateTime.Now; model.CLState = 3; return(dal.UpdateOne(model)); }
public int Updatestate(int lid) { Maticsoft.Model.CustomLosts model = new BLL.CustomLosts().GetModel(lid); if (model.CLState == 1) { return(0); } else { return(1); } }
//显示数据 public List <Model.CustomLosts> SelectAllCustomLosts(int pagesize, int pageindex, Maticsoft.Model.CustomLosts models) { StringBuilder str = new StringBuilder(); if (!string.IsNullOrEmpty(models.CusName)) { str.AppendFormat(" and Customers.CusName like '%{0}%'", models.CusName); } if (models.CLState > 0) { str.AppendFormat(" and CustomLosts.CLState={0}", models.CLState); } if (!string.IsNullOrEmpty(Convert.ToString(models.CLEnterDate))) { var CLEnterDate = Convert.ToDateTime(models.CLEnterDate).ToString("yyyy-MM-dd"); str.AppendFormat(" and convert(varchar(10),CLEnterDate,120)='{0}' ", CLEnterDate); } BLL.CustomLosts CustomLosts = new BLL.CustomLosts(); return(CustomLosts.GetModelListTwo(str.ToString(), "1>0" + str.ToString(), pagesize, pageindex)); }
//LostEnter.htm添加 public int ClostAdd(Maticsoft.Model.CustomLosts Clost) { Maticsoft.Model.CustomLosts list = new BLL.CustomLosts().GetModel(Clost.CLID); BLL.CustomLosts ClostBLL = new BLL.CustomLosts(); //修改客户状态为2 即流失 int success = 0; bool check2 = ClostBLL.ClostAdd(Clost);//修改流失措施表为确认流失 if (check2) { bool check = new BLL.Customers().UpdateOne(list.CusID); if (check) { success = 1; } else { success = 0; } } return(success); }