/// <summary> /// 增加一条数据 /// </summary> public int Add(string ziduanmingcheng, string ziduanzhi, string leibie, string fenleibie) { kyfly.Model.jichu_zidianbiao model = new kyfly.Model.jichu_zidianbiao(); model.字段名称 = ziduanmingcheng; model.字段值 = ziduanzhi; model.类别 = leibie; model.分类别 = fenleibie; return(dal.Add(model)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(string Id, string ziduanmingcheng, string ziduanzhi, string leibie, string fenleibie) { kyfly.Model.jichu_zidianbiao model = new kyfly.Model.jichu_zidianbiao(); model = dal.GetModel(int.Parse(Id)); //对于传入的model如果其中属性已经更改,则更改,否则保留原数据库中的数据。 model.字段名称 = ziduanmingcheng; model.字段值 = ziduanzhi; model.类别 = leibie; model.分类别 = fenleibie; return(dal.Update(model)); }
/// <summary> /// 得到一个对象值系列 /// </summary> public string Geteditdata(string Id) { kyfly.Model.jichu_zidianbiao model = new kyfly.Model.jichu_zidianbiao(); model = dal.GetModel(int.Parse(Id)); string retstr = ""; retstr += model.Id + "|"; retstr += model.字段名称 + "|"; retstr += model.字段值 + "|"; retstr += model.类别 + "|"; retstr += model.分类别 + "|"; return(retstr); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update1(kyfly.Model.jichu_zidianbiao model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add1(kyfly.Model.jichu_zidianbiao model) { return(dal.Add(model)); }