internal static void Update(t_Product mProduct, string OperatorID) { if (mProduct == null) { return; } bProduct.Update(mProduct); }
internal static void Del(t_Product mProduct, string OperatorID) { if (mProduct == null) { return; } mProduct.IsEnable = false; bProduct.Update(mProduct); }
internal static void Add(t_Product mProduct, string OperatorID) { if (mProduct == null) { return; } mProduct.KeyID = Guid.NewGuid(); mProduct.LastUpdate = DateTime.Now; bProduct.Add(mProduct); //todo: 增加LOG }
public static List <t_Product> GetProductList(string insurer) { List <t_Product> productList = new List <t_Product>(); DataSet dsProduct = Common.DB.Select(Tables.t_Product) .Where(Tables.t_Product.productSupplier == insurer) .Where(Tables.t_Product.Enabled == true) .ToDataSet(); foreach (DataRow dr in dsProduct.Tables[0].Rows) { t_Product product = NBear.Mapping.ObjectConvertor.ToObject <t_Product>(dr); productList.Add(product); } return(productList); }
public static List <t_Product> GetProductList() { List <t_Product> productList = new List <t_Product>(); DataSet dsProduct = Common.DB.Select(Tables.t_Product) .Join(Tables.t_User, Tables.t_User.username == Tables.t_Product.productSupplier) .Where(Tables.t_Product.Enabled == true) .Where(Tables.t_User.enabled == true) //若保险公司账号被禁用,则产品亦不可用 .ToDataSet(); foreach (DataRow dr in dsProduct.Tables[0].Rows) { t_Product product = NBear.Mapping.ObjectConvertor.ToObject <t_Product>(dr); productList.Add(product); } return(productList); }
public void DelProduct(t_Product mProduct, string OperatorID) { Func.tProduct.Del(mProduct, OperatorID); }
public void SetProduct(t_Product mProduct, string OperatorID) { Func.tProduct.Update(mProduct, OperatorID); }
public void AddProduct(t_Product mProduct, string OperatorID) { Func.tProduct.Add(mProduct, OperatorID); }