public static bool AddAreaIDToCusrTBL() { IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); baseDAOSQLite.Open(); try { IKHBM ikhbm = new KHBM(); IXZQYBM ixzqybm = new XZQYBM(); List <KHBMModal> list = ikhbm.SelectKHBM_WJ(1); if (list == null) { return(false); } if (0 < list.Count) { for (int i = 0; i < list.Count; i++) { KHBMModal modal = list[i]; string sH = modal.SH; if (sH.Length >= 4) { if (!string.IsNullOrEmpty(sH) && (4 <= sH.Length)) { ikhbm.UpdateKHBM_DQBM(modal.BM, sH.Substring(0, 4)); } string strBM = sH.Substring(0, 4); List <XZQYBMModal> list2 = ixzqybm.SelectXZQYBM_BM(strBM); if ((list2 != null) && (0 < list2.Count)) { ikhbm.UpdateKHBM_DQMC(modal.BM, list2[0].MC.Trim()); } } } PropertyUtil.SetValue(DingYiZhiFuChuan.A6KHMsgWrite, "已经添加地区代码到客户编码表"); } else { return(false); } } catch (BaseException exception) { writeLogfile("Errinfo:" + exception.Message, _Loger); _Loger.Error(exception.ToString()); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { writeLogfile("Errinfo:" + exception2.Message, _Loger); _Loger.Error(exception2.ToString()); ExceptionHandler.HandleError(exception2); } finally { baseDAOSQLite.Commit(); baseDAOSQLite.Close(); } return(true); }
public bool yhzc_contain_slv(string yhzc, string slv, bool ishysy) { string str = "aisino.Fwkp.Bmgl.BMSPFL.SelectYhzcs"; IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); ArrayList list = baseDAOSQLite.querySQL(str, dictionary); if (ishysy) { foreach (Dictionary <string, object> dictionary2 in list) { if ((dictionary2["YHZCMC"].ToString() == yhzc) && (dictionary2["SLV"].ToString() == "")) { return(true); } } return(false); } slv = ((double.Parse(slv) * 100.0)).ToString() + "%"; foreach (Dictionary <string, object> dictionary3 in list) { if ((dictionary3["YHZCMC"].ToString() == yhzc) && (dictionary3["SLV"].ToString() == "")) { return(true); } if ((dictionary3["YHZCMC"].ToString() == yhzc) && dictionary3["SLV"].ToString().Contains(slv)) { return(true); } } return(false); }
public static Dictionary <string, object> GetFPLBBM() { try { IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Clear(); foreach (Dictionary <string, object> dictionary2 in baseDAOSQLite.querySQL("aisino.Fwkp.Fplygl.FPLBBM.AllData", dictionary)) { string key = dictionary2["BM"].ToString().Trim(); string str2 = dictionary2["MC"].ToString().Trim(); if (!dictionary.ContainsKey(key)) { dictionary.Add(key, str2); } } return(dictionary); } catch (BaseException exception) { loger.Error(exception.Message); ExceptionHandler.HandleError(exception); return(null); } catch (Exception exception2) { loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); return(null); } }
public InviteService( IBaseDAO <AppUserEntity> userDAO, IBaseDAO <RoleEntity> roleDAO, IBaseDAO <InviteEntity> inviteDAO, IGroupStore groupStore, IGroupUserStore groupUserStore, IEmailService mailService, IAddInviteFilter addInviteFilter, IValidator <InviteToGroupRequest> inviteToGroupRequestValidator, IValidator <InviteRequest> inviteRequestValidator, ILogger <InviteService> logger, IOptions <IdentityUIOptions> identityManagementOptions, IOptions <IdentityUIEndpoints> identityManagementEndpoints) { _userDAO = userDAO; _roleDAO = roleDAO; _inviteDAO = inviteDAO; _groupStore = groupStore; _groupUserStore = groupUserStore; _mailService = mailService; _addInviteFilter = addInviteFilter; _inviteToGroupRequestValidator = inviteToGroupRequestValidator; _inviteRequestValidator = inviteRequestValidator; _logger = logger; _identityManagementOptions = identityManagementOptions.Value; _identityManagementEndpoints = identityManagementEndpoints.Value; }
static BaseDAOFactory() { ibaseDAO_0 = null; ibaseDAO_1 = null; object_0 = new object(); object_1 = new object(); }
public DataTable GetData(int year) { try { IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); string str = year.ToString(); dictionary.Add("Year", str); UserMsg msg = new UserMsg(); if (msg.IsAdmin) { dictionary.Add("AdminBz", 1); } else { dictionary.Add("AdminBz", 0); } dictionary.Add("Admin", msg.MC); return(baseDAOSQLite.querySQLDataTable("aisino.fwkp.fpkj.YFCX", dictionary)); } catch (BaseException exception) { this.loger.Error(exception.Message); MessageManager.ShowMsgBox(exception.Message); return(null); } catch (Exception exception2) { this.loger.Error(exception2.Message); MessageManager.ShowMsgBox(exception2.Message); return(null); } }
/// <summary> /// Returns an instance of the specified clazz with the specified dbConnString. /// The class must implement the IBaseDAO interface. If the dbConnString argument is null /// the default connection string will be used. /// </summary> /// <param name="clazz">The fully qualified name of the class to be instantiated</param> /// <param name="dbConnString">The Database connection string</param> /// <returns>an instance of the specified clazz </returns> public static IBaseDAO GetDAO(string clazz, string dbConnString) { if (string.IsNullOrEmpty(clazz)) { LoggerHelper.Error("Class is not specified."); throw new ArgumentNullException("Class is not specified."); } if (string.IsNullOrEmpty(dbConnString)) { LoggerHelper.Debug("DB ConnString empty using default."); dbConnString = ConfigurationManager.AppSettings[DBConfigParamName]; } Type type = Type.GetType(clazz); ConstructorInfo constInfo = type.GetConstructor(new Type[] { typeof(string) }); IBaseDAO instance = null; if (constInfo == null) { instance = (IBaseDAO)Activator.CreateInstance(type); } else { instance = (IBaseDAO)constInfo.Invoke(new Object[] { dbConnString }); } return(instance); }
public GroupUserStore( IBaseRepository <GroupUserEntity> groupUserRepository, IBaseRepository <RoleEntity> roleRepository, IBaseRepository <RoleAssignmentEntity> roleAssignmentRepository, IBaseDAO <GroupUserEntity> groupUserDAO, IBaseDAO <RoleAssignmentEntity> roleAssignmentDAO, IBaseDAO <RoleEntity> roleDAO, IOptions <IdentityUIClaimOptions> identityUIClaimOptions, IIdentityUIUserInfoService identityUIUserInfoService, ILogger <GroupUserStore> logger) { _groupUserRepository = groupUserRepository; _roleRepository = roleRepository; _roleAssignmentRepository = roleAssignmentRepository; _groupUserDAO = groupUserDAO; _roleAssignmentDAO = roleAssignmentDAO; _roleDAO = roleDAO; _identityUIClaimOptions = identityUIClaimOptions.Value; _identityUIUserInfoService = identityUIUserInfoService; _logger = logger; }
/// <summary> /// Carrega os dados da tabela filha tem como base os relacionamento entre ela e a atual model, que s�o /// identificados pelo atributos <see cref="PersistenceForeignKeyAttribute"/>. /// </summary> /// <typeparam name="ClassChild">Tipo da classe que representa a tabela filha.</typeparam> /// <param name="parentObj">Objeto contendo as informa��es para fazer o relacionamento.</param> /// <param name="groupOfRelationship">Nome do grupo de relacionamento.</param> /// <param name="sortExpression">Informa��o sobre o propriedade a ser ordenada.</param> /// <param name="paging">Informa��es sobre a pagina��o do resultado.</param> /// <returns>Lista tipada do tipo da classe que representa a tabela filha.</returns> public GDAList <ClassChild> LoadDataForeignKeyParentToChild <ClassChild>(Model parentObj, string groupOfRelationship, InfoSortExpression sortExpression, InfoPaging paging) where ClassChild : new() { IBaseDAO <ClassChild> dao = GDAOperations.GetDAO <ClassChild>(); List <GDAParameter> parameters; string sql; MakeSqlForeignKeyParentToChild <ClassChild>(parentObj, groupOfRelationship, dao, out sql, out parameters, UserProvider); MethodInfo mi = dao.GetType().GetMethod("GetSqlData", GDA.Common.Helper.ReflectionFlags.AllCriteria); object ret = null; try { ret = mi.Invoke(dao, new object[] { sql, parameters, sortExpression, paging }); } catch (Exception ex) { throw new GDAException(ex.InnerException); } return((GDAList <ClassChild>)ret); }
public AuctionStockService( IBaseDAO <Stock> pObjStockDAO, IBaseDAO <Auction> pObjAuctionDAO, IBaseDAO <Batch> pObjBatchDAO, IBaseDAO <BatchLine> pObjBatchLineDAO, IBaseDAO <GoodsIssue> pObjGoodsIssueDAO, IBaseDAO <GoodsReceipt> pObjGoodsReceiptDAO, IBaseDAO <GoodsReturn> pObjGoodsReturnDAO, IBaseDAO <Item> pObjItemDAO, IBaseDAO <ItemType> pObjItemTypeDAO, IBaseDAO <ItemDefinition> pObjItemDefinitionDAO, IBaseDAO <ItemTypeDefinition> pObjItemTypeDefinitionDAO, IBaseDAO <Change> pObjChangeDAO) { mObjStockDAO = pObjStockDAO; mObjAuctionDAO = pObjAuctionDAO; mObjBatchDAO = pObjBatchDAO; mObjBatchLineDAO = pObjBatchLineDAO; mObjGoodsIssueDAO = pObjGoodsIssueDAO; mObjGoodsReceiptDAO = pObjGoodsReceiptDAO; mObjGoodsReturnDAO = pObjGoodsReturnDAO; mObjItemDAO = pObjItemDAO; mObjItemTypeDAO = pObjItemTypeDAO; mObjItemDefinitionDAO = pObjItemDefinitionDAO; mObjItemTypeDefinitionDAO = pObjItemTypeDefinitionDAO; mObjChangeDAO = pObjChangeDAO; }
public ServerUP() { this.string_0 = "0000"; this.ibaseDAO_0 = BaseDAOFactory.GetBaseDAOSQLite(); this.class84_0 = new Class84(); this.taxCard_0 = TaxCard.CreateInstance(CTaxCardType.const_7); }
public static void smethod_4() { try { if (Class87.list_1.Count >= 1) { IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); new Dictionary <string, string>(); TaxCard.CreateInstance(CTaxCardType.const_7); List <string> list = new List <string>(); for (int i = 0; i < Class87.list_1.Count; i++) { if (Class87.list_1[i].ContainsKey("BSRZ")) { list.Add("Aisino.Framework.MainForm.UpDown.UpdateBSRZ"); Class87.list_1[i]["BSRZ"] = "【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】" + Class87.list_1[i]["BSRZ"].ToString(); if (Class87.list_1[i]["BSRZ"].ToString().Length > 0xc3) { Class87.list_1[i]["BSRZ"] = Class87.list_1[i]["BSRZ"].ToString().Substring(0, 0xc3); } } } if (baseDAOSQLite.未确认DAO方法1(list.ToArray(), Class87.list_1) > 0) { Class87.list_1.Clear(); } } } catch (Exception exception) { Class101.smethod_1("(下载线程)更改发票报送日志出错:" + exception.ToString()); } }
public PermissionService(IBaseDAO <Module> pObjModuleDAO, IBaseDAO <Section> pObjSectionDAO, IBaseDAO <Permission> pObjPermissionDAO, IBaseDAO <User> pObjUserDAO) { mObjModuleDAO = pObjModuleDAO; mObjSectionDAO = pObjSectionDAO; mObjPermissionDAO = pObjPermissionDAO; mObjUserDAO = pObjUserDAO; }
public GroupAttributeDataService( IBaseDAO <GroupAttributeEntity> groupAttributeDAO, IValidator <DataTableRequest> dataTableValidator, ILogger <GroupAttributeDataService> logger) { _groupAttributeDAO = groupAttributeDAO; _dataTableValidator = dataTableValidator; _logger = logger; }
public GroupStore(IBaseRepository <GroupEntity> groupRepository, IBaseDAO <GroupEntity> groupDAO, IIdentityUIUserInfoService identityUIUserInfoService, ILogger <GroupStore> logger) { _groupRepository = groupRepository; _groupDAO = groupDAO; _identityUIUserInfoService = identityUIUserInfoService; _logger = logger; }
private IBaseDAO GetDAO(string clazz) { string dbConnString = ConfigurationManager.AppSettings[DBConfigParamName]; Type type = Type.GetType(clazz); ConstructorInfo constInfo = type.GetConstructor(new Type[] { typeof(string) }); IBaseDAO instance = (IBaseDAO)constInfo.Invoke(new Object[] { dbConnString }); return(instance); }
/// <summary> /// Captura a quantidade de linhas que da tabela filha tem, se baseado no relacionamento com a atual model. /// </summary> /// <typeparam name="ClassChild">Tipo da classe que representa a tabela filha.</typeparam> /// <param name="parentObj">Objeto contendo as informa��es para fazer o relacionamento.</param> /// <param name="groupOfRelationship">Nome do grupo de relacionamento.</param> /// <returns>Quantidade de linhas encontradas.</returns> public int CountRowForeignKeyParentToChild <ClassChild>(Model parentObj, string groupOfRelationship) where ClassChild : new() { IBaseDAO <ClassChild> dao = GDAOperations.GetDAO <ClassChild>(); List <GDAParameter> parameters; string sql; MakeSqlForeignKeyParentToChild <ClassChild>(parentObj, groupOfRelationship, dao, out sql, out parameters, UserProvider); sql = sql.Replace("SELECT *", "SELECT COUNT(*)"); return(ExecuteSqlQueryCount(sql, parameters.ToArray())); }
public KMProperty() { try { this.baseDao = BaseDAOFactory.GetBaseDAOSQLite(); } catch (Exception exception) { this.loger.Error("发票转凭证错误:" + exception.Message); } }
public GroupInviteDataService( IGroupUserStore userStore, IBaseDAO <InviteEntity> inviteDAO, IValidator <DataTableRequest> dataTableRequestValidator, ILogger <GroupInviteDataService> logger) { _userStore = userStore; _inviteDAO = inviteDAO; _dataTableRequestValidator = dataTableRequestValidator; _logger = logger; }
public DKFP() { try { this.baseDao = BaseDAOFactory.GetBaseDAOSQLite(); this.dict = new Dictionary <string, object>(); } catch (Exception exception) { this.loger.Error(exception.Message); } }
public GroupAdminAuditDataService( IBaseDAO <AuditEntity> auditDAO, IValidator <DataTableRequest> dataTableRequestValidator, IValidator <GroupAdminAuditTableRequest> auditTableRequestValidator, IValidator <Select2Request> select2RequestValidator, ILogger <GroupAdminAuditDataService> logger) { _auditDAO = auditDAO; _dataTableRequestValidator = dataTableRequestValidator; _auditTableRequestValidator = auditTableRequestValidator; _select2RequestValidator = select2RequestValidator; _logger = logger; }
public GroupUserDataService( IBaseDAO <GroupUserEntity> groupUserDAO, IBaseDAO <AppUserEntity> appUserDAO, IValidator <DataTableRequest> dataTableValidator, IValidator <Select2Request> select2Validator, ILogger <GroupUserDataService> logger) { _groupUserDAO = groupUserDAO; _appUserDAO = appUserDAO; _dataTableValidator = dataTableValidator; _select2Validator = select2Validator; _logger = logger; }
private void method_3() { try { IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); string str = "SELECT * FROM XTBBXX"; this.dataTable_0 = baseDAOSQLite.querySQLDataTable(str); } catch (Exception exception) { this.ilog_0.Error("LoadReginfoFromDB异常:" + exception.ToString()); } }
public GroupAdminDashboardDataService( IGroupUserStore groupUserStore, IBaseDAO <AuditEntity> auditDAO, IValidator <TimeRangeRequest> timeRangeRequestValidator, ILogger <GroupAdminDashboardDataService> logger) { _groupUserStore = groupUserStore; _auditDAO = auditDAO; _timeRangeRequestValidator = timeRangeRequestValidator; _logger = logger; }
public AuditDataService( IBaseDAO <AuditEntity> auditDAO, IHttpContextAccessor httpContextAccessor, IValidator <DataTableRequest> dataTableRequestValidator, IValidator <AuditTableRequest> auditTableRequestValidator, ILogger <AuditDataService> logger) { _auditDAO = auditDAO; _httpContextAccessor = httpContextAccessor; _dataTableRequestValidator = dataTableRequestValidator; _auditTableRequestValidator = auditTableRequestValidator; _logger = logger; }
public static IBaseDAO GetBaseDAONpgSQL(bool bool_0) { if (ibaseDAO_1 == null) { lock (object_1) { if (ibaseDAO_1 == null) { ibaseDAO_1 = new BaseDAONpgSQL(GetConnString(0), bool_0); } } } return(ibaseDAO_1); }
public static IBaseDAO GetBaseDAOSQLite(bool bool_0) { if (ibaseDAO_0 == null) { lock (object_0) { if (ibaseDAO_0 == null) { ibaseDAO_0 = new BaseDAOSQLite(GetConnString(1), bool_0); } } } return(ibaseDAO_0); }
public AuditDataService( IBaseDAO <AuditEntity> auditDAO, IIdentityUIUserInfoService identityUIUserInfoService, IValidator <DataTableRequest> dataTableRequestValidator, IValidator <AuditTableRequest> auditTableRequestValidator, ILogger <AuditDataService> logger) { _auditDAO = auditDAO; _identityUIUserInfoService = identityUIUserInfoService; _dataTableRequestValidator = dataTableRequestValidator; _auditTableRequestValidator = auditTableRequestValidator; _logger = logger; }
public ProfileImageService( IBaseDAO <UserImageEntity> userImageDAO, IMemoryCache memoryCache, IDefaultProfileImageService defaultProfileImageService, IOptions <IdentityUIOptions> identityUIOptions, ILogger <ProfileImageService> logger) { _userImageDAO = userImageDAO; _memoryCache = memoryCache; _defaultProfileImageService = defaultProfileImageService; _identityUIOptions = identityUIOptions.Value; _logger = logger; }
public bool yhzc_contain_slv(string yhzc, string slv, bool flag, bool isTsfp) { string str = "aisino.fwkp.Wbjk.SelectYhzcs"; IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); ArrayList list = baseDAOSQLite.querySQL(str, dictionary); if (isTsfp) { foreach (Dictionary <string, object> dictionary2 in list) { if ((dictionary2["YHZCMC"].ToString() == yhzc) && (dictionary2["SLV"].ToString() == "")) { return(true); } } return(false); } if ((slv == "免税") || (slv == "不征税")) { slv = "0%"; } else if (!flag) { slv = ((double.Parse(slv) * 100.0)).ToString() + "%"; } foreach (Dictionary <string, object> dictionary2 in list) { string[] source = dictionary2["SLV"].ToString().Split(new string[] { "、", ",", "," }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < source.Length; i++) { if (source[i] == "1.5%_5%") { source[i] = "1.5%"; } } if ((dictionary2["YHZCMC"].ToString() == yhzc) && (dictionary2["SLV"].ToString() == "")) { return(true); } if ((dictionary2["YHZCMC"].ToString() == yhzc) && source.Contains <string>(slv)) { return(true); } } return(false); }
public LoginBusiness(IBaseDAO<Customer> dao) : base(dao) { _dao = dao; }