public static ExpressCompany GetExpressCompanyDetail(string id) { ExpressCompany model = new ExpressCompany(); DataTable dt = ExpressCompanyDAL.BaseProvider.GetExpressCompanyDetail(id); model.FillData(dt.Rows[0]); return model; }
public static List<ExpressCompany> GetExpressCompanys(string keyWords, int pageSize, int pageIndex, ref int totalCount, ref int pageCount) { DataTable dt = CommonBusiness.GetPagerData("ExpressCompany", "*", " Status<>9 ", "AutoID", pageSize, pageIndex, out totalCount, out pageCount); List<ExpressCompany> list = new List<ExpressCompany>(); ExpressCompany model; foreach (DataRow item in dt.Rows) { model = new ExpressCompany(); model.FillData(item); list.Add(model); } return list; }
public static List<ExpressCompany> GetExpressCompanys() { DataTable dt = ExpressCompanyDAL.BaseProvider.GetExpressCompanys(); List<ExpressCompany> list = new List<ExpressCompany>(); ExpressCompany model; foreach (DataRow item in dt.Rows) { model = new ExpressCompany(); model.FillData(item); list.Add(model); } return list; }
public static List<ExpressCompany> GetExpressCompanys(string keyWords, int pageSize, int pageIndex, ref int totalCount, ref int pageCount) { string sqlWhere = "Status<>9"; if (!string.IsNullOrEmpty(keyWords)) sqlWhere += " and Name like '%"+keyWords+"%'"; DataTable dt = CommonBusiness.GetPagerData("ExpressCompany", "*", sqlWhere, "AutoID", pageSize, pageIndex, out totalCount, out pageCount); List<ExpressCompany> list = new List<ExpressCompany>(); ExpressCompany model; foreach (DataRow item in dt.Rows) { model = new ExpressCompany(); model.FillData(item); list.Add(model); } return list; }
public static bool UpdateExpressCompany(ExpressCompany model) { return ExpressCompanyDAL.BaseProvider.UpdateExpressCompany(model.ExpressID, model.Name, model.Website); }
public static bool InsertExpressCompany(ExpressCompany model) { return ExpressCompanyDAL.BaseProvider.InsertExpressCompany(model.Name, model.Website, model.CreateUserID); }
public static ExpressCompany GetExpressCompanyDetail(string id) { id = id.ToLower(); if (ExpressCompanys.ContainsKey(id)) { return ExpressCompanys[id]; } ExpressCompany model = new ExpressCompany(); DataTable dt = ExpressCompanyDAL.BaseProvider.GetExpressCompanyDetail(id); model.FillData(dt.Rows[0]); ExpressCompanys.Add(id, model); return model; }