public bool DeletedCompanyClientConfig(int pkid, string user) { var result = false; CompanyClientConfig data = null; try { dbScopeManager.CreateTransaction(conn => { data = DALCompanyClient.SelectCompanyClientConfigByPkid(conn, pkid); if (data != null) { DALCompanyClient.DeletedCompanyClientConfig(conn, pkid); DALCompanyClient.DeletedCouponCodeByPkid(conn, pkid); result = true; } }); } catch (Exception ex) { logger.Log(Level.Error, ex, "DeletedCompanyClientConfig"); } InsertLog("DeletedCompanyClientConfig", pkid.ToString(), JsonConvert.SerializeObject(data), result ? "删除成功" : "删除失败", user); return(result); }
public CompanyClientConfig GetCompanyClientConfigByPkid(int pkid) { CompanyClientConfig result = new CompanyClientConfig(); try { result = dbScopeReadManager.Execute(conn => DALCompanyClient.SelectCompanyClientConfigByPkid(conn, pkid)); } catch (Exception ex) { logger.Log(Level.Error, ex, "GetAllCompanyClientConfig"); } return(result); }