public M_User_StoreUser GetModelFromReader(DbDataReader rdr) { M_User_StoreUser model = new M_User_StoreUser(); model.ID = Convert.ToInt32(rdr["ID"]); model.UserID = ConvertToInt(rdr["UserID"]); model.StoreID = ConvertToInt(rdr["StoreID"]); model.UserLevel = ConvertToInt(rdr["UserLevel"]); model.HoneyName = ConverToStr(rdr["HoneyName"]); model.Mobile = ConverToStr(rdr["Mobile"]); model.Sex = ConverToStr(rdr["Sex"]); model.BirthDay = ConverToStr(rdr["BirthDay"]); model.WXNo = ConverToStr(rdr["WXNo"]); model.Remark = ConverToStr(rdr["Remark"]); model.CDate = ConvertToDate(rdr["CDate"]); model.UserFace = ConverToStr(rdr["UserFace"]); model.ZStatus = ConvertToInt(rdr["ZStatus"]); model.CardNo = ConverToStr(rdr["CardNo"]); model.CardLevel = ConverToStr(rdr["CardLevel"]); model.CardRemark = ConverToStr(rdr["CardRemark"]); model.CardStatus = ConvertToInt(rdr["CardStatus"]); model.UserLabel = ConverToStr(rdr["UserLabel"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_User_StoreUser model = this; if (model.CDate <= DateTime.MinValue) { model.CDate = DateTime.Now; } SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.UserID; sp[2].Value = model.StoreID; sp[3].Value = model.UserLevel; sp[4].Value = model.HoneyName; sp[5].Value = model.Mobile; sp[6].Value = model.Sex; sp[7].Value = model.BirthDay; sp[8].Value = model.WXNo; sp[9].Value = model.Remark; sp[10].Value = model.CDate; sp[11].Value = model.UserFace; sp[12].Value = model.ZStatus; sp[13].Value = model.CardNo; sp[14].Value = model.CardLevel; sp[15].Value = model.CardRemark; sp[16].Value = model.CardStatus; sp[17].Value = model.UserLabel; return(sp); }
public bool UpdateByID(M_User_StoreUser model) { return(DBCenter.UpdateByID(model, model.ID)); }
public int Insert(M_User_StoreUser model) { return(DBCenter.Insert(model)); }