public void GenerateNewTransactionCode(IDomainDataProvider dataProvider) { DBDateTime currentDateTime = FormatHelper.GetNowDBDateTime(dataProvider); this.m_TransactionCode = TransferFacade.MOMaterialTransferJobID + "_" + currentDateTime.DBDate.ToString() + "_" + currentDateTime.DBTime.ToString() + DateTime.Now.Millisecond.ToString(); }
private void RunSP(object jobName) { try { DataRow rowOfJob = this.FindRow(jobName.ToString()); rowOfJob["RunStatus"] = "运行中"; ProcedureParameter pp1 = new ProcedureParameter("v_jobList", typeof(string), 40, DirectionType.Input, jobName.ToString()); ProcedureParameter pp2 = new ProcedureParameter("v_date", typeof(int), 8, DirectionType.Input, m_InputDate); ProcedureCondition pc = new ProcedureCondition("PKG_DBTRANSFER.Transfer", new ProcedureParameter[] { pp1, pp2 }); // 多线程Run每一个任务,每一个任务自己创建自己的数据库链接 IDomainDataProvider newProvider = DomainDataProviderManager.DomainDataProvider(); newProvider.CustomProcedure(ref pc); Thread.Sleep(10000); rowOfJob["RunStatus"] = "完成"; TransferJob job = TransferFacade.GetTransferJob(Convert.ToInt32(rowOfJob["Serial"])) as TransferJob; rowOfJob["LastRunDate"] = job.LastRunDate == 0 ? "0" : FormatHelper.TODateTimeString(job.LastRunDate, job.LastRunTime); rowOfJob["LastSuccessDate"] = job.LastSuccessDate == 0 ? "0" : FormatHelper.TODateTimeString(job.LastSuccessDate, job.LastSuccessTime); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { this.Invoke(new Action <int>(this.SetFlag), 1); } }
public SystemParameterListBuilder(string paramGroupCode, string orderbyColumn, IDomainDataProvider dataProvider) { this._paramGroupCode = paramGroupCode.ToUpper(); this._orderbyColumn = orderbyColumn.ToUpper(); _dataProvider = dataProvider; }
private ApplicationService(IDomainDataProvider _dataProvider) { if (_dataProvider != null) { _dataProvider = _dataProvider; } }
public static void CheckDomainObject(object domainObject, IDomainDataProvider domainObjectDataProvider) { if (!(domainObject is DomainObject)) { ExceptionManager.Raise(typeof(DomainObject), "$Error_Should_Be_DomainObject", string.Format("[$DomainObject={0}]", domainObject), null); } }
public static void CheckDomainObject(object domainObject, IDomainDataProvider domainObjectDataProvider) { if (!(domainObject is DomainObject)) { throw new Exception(string.Format("$Error_Should_Be_DomainObject[$DomainObject={0}]", domainObject)); } }
public bool InitWithoutResAndOP(IDomainDataProvider dataProvider, string ssCode, DBDateTime dbDateTime) { bool returnValue = false; BaseModelFacade baseModelFacade = new BaseModelFacade(dataProvider); ShiftModelFacade shiftModelFacade = new ShiftModelFacade(dataProvider); _DataProvider = dataProvider; _DBDateTime = dbDateTime; //获取对应的SS _StepSequence = (StepSequence)baseModelFacade.GetStepSequence(ssCode); if (_StepSequence == null) { return(returnValue); } //获取当前的ShiftDate _ShiftDate = shiftModelFacade.GetShiftDayBySS(_StepSequence, _DBDateTime.DateTime); //获取当前的Shift _Shift = (Shift)shiftModelFacade.GetShift(_StepSequence.ShiftTypeCode, _DBDateTime.DBTime); if (_Shift == null) { return(returnValue); } returnValue = true; return(returnValue); }
public DeleteAssociateCheck(DomainObject obj, IDomainDataProvider dataProvider, Type[] associateTypes) { this._objs = new DomainObject[1] { obj }; this._provider = dataProvider; this._types = associateTypes; }
public static void GetDBDateTime(out int intDate, out int intTime, IDomainDataProvider dataProvider) { DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(dataProvider); DateTime dtNow = FormatHelper.ToDateTime(dbDateTime.DBDate, dbDateTime.DBTime); intDate = FormatHelper.TODateInt(dtNow); intTime = FormatHelper.TOTimeInt(dtNow); }
public ReportSQLHelper(IDomainDataProvider domainDataProvider) { this._DomainDataProvider = domainDataProvider; if (_DomainDataProvider == null) { _DomainDataProvider = DomainDataProviderManager.DomainDataProvider(); } }
// private CacheManager _cacheManager = null; private ApplicationService(IDomainDataProvider _dataProvider) { if (_dataProvider != null) //added by carey.cheng on 2010-05-20 for muti db support { _menuSerivce = new MenuService(_dataProvider); } ; }
public ImportDataEngine(IDomainDataProvider _dataProvider, List <ConfigObject> _listConfigObject, MatchType _matchType, string _userCode, DBDateTime _dbDateTime) { dataProvider = _dataProvider; listConfigObj = _listConfigObject; matchType = _matchType; userCode = _userCode.Trim().ToUpper(); dbDateTime = _dbDateTime; }
public ModuleSecurityEntity(Module module, string viewRights, IDomainDataProvider domainDataProvider) { this._domainDataProvider = domainDataProvider; this._module = module; this._viewRights = viewRights; this._distributeViewRights(); }
public DNConfrimArgument(IDomainDataProvider dataProvider) { DBDateTime currentDateTime = FormatHelper.GetNowDBDateTime(dataProvider); this.m_TransactionCode = TransferFacade.DNConfirmJobID + "_" + currentDateTime.DBDate.ToString() + "_" + currentDateTime.DBTime.ToString() + DateTime.Now.Millisecond.ToString(); }
public UserSecurityEntity(User user, IDomainDataProvider domainDataProvider) { this._domainDataProvider = domainDataProvider; this._user = user; this._loadUserGroupSecurityEntity(); this._mergeSecurity(); }
public MaterialPOTransferArgument(IDomainDataProvider domainDataProvider) { DBDateTime currentDateTime = FormatHelper.GetNowDBDateTime(domainDataProvider); this.m_TransactionCode = TransferFacade.MaterialPOJobID + "_" + currentDateTime.DBDate.ToString() + "_" + currentDateTime.DBTime.ToString() + DateTime.Now.Millisecond.ToString(); }
public void LoadErrorList(string itemCode, IDomainDataProvider dataProvider) { TSModelFacade tsFacade = new TSModelFacade(dataProvider); try { this.ClearErrorList(); object[] errorCodeGroups = tsFacade.GetErrorCodeGroupByItemCode(itemCode); if (errorCodeGroups != null) { string errorGroupList = ""; DataRow newRow; foreach (ErrorCodeGroupA errorGroup in errorCodeGroups) { errorGroupList += errorGroup.ErrorCodeGroup + ","; newRow = this.m_ErrorList.Tables["ErrorGroup"].NewRow(); newRow["ErrorGroupCode"] = errorGroup.ErrorCodeGroup; newRow["ErrorGroupDescription"] = errorGroup.ErrorCodeGroupDescription; this.m_ErrorList.Tables["ErrorGroup"].Rows.Add(newRow); } if (errorGroupList.Length > 0) { errorGroupList = errorGroupList.Substring(0, errorGroupList.Length - 1); } // Get ErrorCode List By ErrorGroupList if (errorGroupList.Length > 0) { object[] errorCodes = tsFacade.GetErrorCodeByErrorGroupList(errorGroupList); if (errorCodes != null) { DataRow row; foreach (ErrorGrou2ErrorCode4OQC eg2ec in errorCodes) { row = this.m_ErrorList.Tables["ErrorCode"].NewRow(); row["Checked"] = "false"; row["ErrorCodeCode"] = eg2ec.ErrorCode; row["ErrorCodeDescription"] = eg2ec.ErrorCodeDescription; row["ErrorGroupCode"] = eg2ec.ErrorCodeGroup; this.m_ErrorList.Tables["ErrorCode"].Rows.Add(row); } } } this.m_ErrorList.Tables["ErrorGroup"].AcceptChanges(); this.m_ErrorList.Tables["ErrorCode"].AcceptChanges(); this.m_ErrorList.AcceptChanges(); this.ultraGridErrorList.DataSource = this.m_ErrorList; } } catch (Exception ex) { } }
private void Init() { //_persistBroker = PersistBrokerManager.PersistBroker(@"Provider=Microsoft.Jet.OLEDB.4.0;Password=;Data Source=" + this.FullPath + ";Persist Security Info=True", null); //add by klaus _persistBroker = PersistBrokerManager.PersistBroker(@"Provider=Microsoft.ACE.OLEDB.12.0;Password=;Data Source=" + this.FullPath + ";Persist Security Info=False", null); //end _domainDataProvider = DomainDataProviderManager.DomainDataProvider(_persistBroker, null); _languageHashtable = new System.Collections.Hashtable(); this.CacheLanguage(); }
public ReportSQLEngine(IDomainDataProvider domainDataProvider, LanguageComponent languageComponent) { _DomainDataProvider = domainDataProvider; _LanguageComponent = languageComponent; //if (_DomainDataProvider == null) //{ // _DomainDataProvider = DomainDataProviderManager.DomainDataProvider(); //} }
public ImportDateEngine(IDomainDataProvider dataProvider, LanguageComponent languageComponent1, string importType, DataTable table, string userCode, ArrayList importGridRow, GridHelperNew _gridHelper) { _DataProvider = dataProvider; _LanguageComponent1 = languageComponent1; _ImportType = importType; _ImportDataTable = table; _UserCode = userCode; _ImportGridRow = importGridRow; this.gridHelper = _gridHelper; }
public static Updater GetCsVersion(IDomainDataProvider domainDataProvider) { object[] objs = domainDataProvider.CustomQuery(typeof(Updater), new SQLCondition("select CSVERSION,LOCATION,LOGINUSER,LOGINPASSWORD,ISAVIABLE from TBLCSUPDATER where ISAVIABLE = 1")); if (objs == null || objs.Length < 1) { return(null); } return((Updater)objs[0]); }
public ImportManCountDateEngine(IDomainDataProvider dataProvider, LanguageComponent languageComponent1, string importType, DataTable table, string userCode, ArrayList importGridRow, string checkcolumn) { _dataProvider = dataProvider; _languageComponent1 = languageComponent1; ImportType = importType; ImportDatatable = table; UserCode = userCode; ImportGridRow = importGridRow; checkColumn = checkcolumn; }
public DNTransferArgument(IDomainDataProvider dataProvider) { DBDateTime currentDateTime = FormatHelper.GetNowDBDateTime(dataProvider); DateTime wantedDateTime = FormatHelper.ToDateTime(currentDateTime.DBDate, currentDateTime.DBTime).AddDays(InternalVariables.MS_DateOffSet); this.m_MaintainDate_B = wantedDateTime.Date; this.m_MaintainDate_E = wantedDateTime.Date; this.m_TransactionCode = TransferFacade.DNTransferJobID + "_" + currentDateTime.DBDate.ToString() + "_" + currentDateTime.DBTime.ToString() + DateTime.Now.Millisecond.ToString(); }
public static DBDateTime GetNowDBDateTime(IDomainDataProvider domainDataProvider) { object[] objs = domainDataProvider.CustomQuery(typeof(DBDateTime), new SQLParamCondition("select to_char(sysdate,'yyyymmdd') as dbdate,to_char(sysdate,'hh24miss') as dbtime from dual where $RCARD = '1'" , new SQLParameter[] { new SQLParameter("RCARD", typeof(string), "1") })); if (objs.Length == 0) { ExceptionManager.Raise(typeof(FormatHelper), "$SystemError_GetDBTimeError"); } return((DBDateTime)objs[0]); }
public static ApplicationService Current() { if (_applicationService == null) { if (_dataProvider == null) { _dataProvider = BenQGuru.eMES.Common.DomainDataProvider.DomainDataProviderManager.DomainDataProvider(); } _applicationService = new ApplicationService(_dataProvider); } return(_applicationService); }
public UserGroupSecurityEntity(string userGroupCode, IDomainDataProvider domainDataProvider) { this._domainDataProvider = domainDataProvider; UserFacade manager = new UserFacade(this.DataProvider); this._userGroup = manager.GetUserGroup(userGroupCode) as UserGroup; if (this._userGroup == null) { ExceptionManager.Raise(this.GetType(), "$Error_User_Group_Not_Exist"); } this._loadModule(); }
public ModuleSecurityEntity(string moduleCode, string viewRights, IDomainDataProvider domainDataProvider) { this._domainDataProvider = domainDataProvider; this._viewRights = viewRights; SystemSettingFacade facade = new SystemSettingFacade(this.DataProvider); object module = facade.GetModule(moduleCode); if (module == null) { ExceptionManager.Raise(this.GetType(), "$Error_Module_Not_Exist"); } this._distributeViewRights(); }
private void GetUnVisibilityMenu(IDomainDataProvider _domainDataProvider) { htUnVisibilityMenu = new Hashtable(); SystemSettingFacade sysFacade = new SystemSettingFacade(_domainDataProvider); object[] objs = sysFacade.GetAllMenuUnVisibility(MenuType.MenuType_BS); if (objs != null) { for (int i = 0; i < objs.Length; i++) { htUnVisibilityMenu.Add(((BenQGuru.eMES.Domain.BaseSetting.Menu)objs[i]).MenuCode, ((BenQGuru.eMES.Domain.BaseSetting.Menu)objs[i]).MenuCode); } } }
public bool Init(IDomainDataProvider dataProvider, string resCode, DBDateTime dbDateTime) { bool returnValue = false; BaseModelFacade baseModelFacade = new BaseModelFacade(dataProvider); ShiftModelFacade shiftModelFacade = new ShiftModelFacade(dataProvider); _DataProvider = dataProvider; _ResCode = resCode; _DBDateTime = dbDateTime; //获取对应的OPCode Operation2Resource op2Res = (Operation2Resource)baseModelFacade.GetOperationByResource(_ResCode); if (op2Res != null) { _Operation = (Operation)baseModelFacade.GetOperation(op2Res.OPCode); } if (_Operation == null) { return(returnValue); } //获取对应的SS Resource res = (Resource)baseModelFacade.GetResource(_ResCode); if (res != null) { _StepSequence = (StepSequence)baseModelFacade.GetStepSequence(res.StepSequenceCode); } if (_StepSequence == null) { return(returnValue); } //获取当前的ShiftDate _ShiftDate = shiftModelFacade.GetShiftDayBySS(_StepSequence, _DBDateTime.DateTime); //获取当前的Shift _Shift = (Shift)shiftModelFacade.GetShift(_StepSequence.ShiftTypeCode, _DBDateTime.DBTime); if (_Shift == null) { return(returnValue); } returnValue = true; return(returnValue); }
public FInvRecCheck() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); UserControl.UIStyleBuilder.FormUI(this); _infoForm = ApplicationRun.GetInfoForm(); _domainDataProvider = ApplicationService.Current().DataProvider; this._facade = new InventoryFacade(this.DataProvider); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // }