public ResultData CheckLogin(string id, string password) { ResultData result = new ResultData(); UPF daoUPF = new UPF(); DataTable dtUPF = daoUPF.ListDataByUserId(id); result.ReturnData = dtUPF; if (dtUPF.Rows.Count != 0) { if (password == dtUPF.Rows[0]["UPF_PASSWORD"].ToString().Trim()) { result.Status = ResultStatus.Success; } else { MessageDisplay.Error("密碼錯誤"); result.Status = ResultStatus.Fail; } } else { MessageDisplay.Error("無此帳號"); result.Status = ResultStatus.Fail; } return(result); }
public WZ0990(string programID, string programName) : base(programID, programName) { InitializeComponent(); this.Text = _ProgramID + "─" + _ProgramName; daoUPF = new UPF(); }
public WZ0019(string programID, string programName) : base(programID, programName) { InitializeComponent(); GridHelper.SetCommonGrid(gvMain); PrintableComponent = gcMain; this.Text = _ProgramID + "─" + _ProgramName; daoZ0019 = new DZ0019(); daoUPF = new UPF(); }
public WZ0010(string programID, string programName) : base(programID, programName) { InitializeComponent(); GridHelper.SetCommonGrid(gvMain, true, new GridColumn[] { UPF_USER_ID }); PrintableComponent = gcMain; this.Text = _ProgramID + "─" + _ProgramName; daoUPF = new UPF(); daoUTP = new UTP(); serviceCommon = new ServiceCommon(); }
public ServiceCommon() { daoOCF = new OCF(); daoAOCF = new AOCF(); daoTXN = new TXN(); daoTXFPARM = new TXFPARM(); daoJSW = new JSW(); daoDataGate = new DataGate(); daoUPF = new UPF(); daoDPT = new DPT(); daoRPT = new RPT(); }
public ServiceZ0010() { daoUPF = new UPF(); daoUTP = new UTP(); }
public ServiceZ0990() { daoUPF = new UPF(); }
public ServiceZ0011() { daoUPF = new UPF(); }
private static void Main(string[] args) { // 將App.config檔裡面DevExpress的設定讀進來 DevExpress.XtraEditors.WindowsFormsSettings.LoadApplicationSettings(); #region Log設定 SingletonLogger.Instance.Severity = (LogSeverity)Enum.Parse(typeof(LogSeverity), SettingDragons.Instance.Setting.Log.LogSeverity, true); ILog log = new ObserverLogToDatabase(); SingletonLogger.Instance.Attach(log); log = new ObserverLogToFile("Debug.txt"); SingletonLogger.Instance.Attach(log); log = new ObserverLogToConsole(); SingletonLogger.Instance.Attach(log); #endregion Log設定 #region GlobalSetting SystemStatus.SystemType = SystemType.CI; ConnectionInfo connectionInfo = SettingDragons.Instance.GetConnectionInfo(SettingDragons.Instance.Setting.Database.CiUserAp); GlobalDaoSetting.Set(connectionInfo); #if DEBUG GlobalInfo.USER_ID = "I0001"; GlobalInfo.USER_NAME = "菲魯特"; GlobalInfo.USER_DPT_ID = "J"; GlobalInfo.USER_DPT_NAME = "資訊規劃部"; #endif string reportDirectoryPath = ""; if (GlobalDaoSetting.GetConnectionInfo.ConnectionName == "CIN2" || Application.StartupPath.IndexOf(@"C:\CI") < 0) { reportDirectoryPath = Path.Combine(Application.StartupPath, "Report", DateTime.Now.ToString("yyyyMMdd")); } else { reportDirectoryPath = Path.Combine(Application.StartupPath, "Excel_Report", DateTime.Now.ToString("yyyyMMdd")); } string excelTemplateDirectoryPath = ""; excelTemplateDirectoryPath = Path.Combine(Application.StartupPath, "Excel_Template"); string batchErrSPDirectoryPath = Path.Combine(Application.StartupPath, "ErrSP"); Directory.CreateDirectory(reportDirectoryPath); GlobalInfo.DEFAULT_REPORT_DIRECTORY_PATH = reportDirectoryPath; Directory.CreateDirectory(excelTemplateDirectoryPath); GlobalInfo.DEFAULT_EXCEL_TEMPLATE_DIRECTORY_PATH = excelTemplateDirectoryPath; Directory.CreateDirectory(batchErrSPDirectoryPath); GlobalInfo.DEFAULT_BATCH_ErrSP_DIRECTORY_PATH = batchErrSPDirectoryPath; #endregion GlobalSetting Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += new ThreadExceptionEventHandler(UIThreadException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); // 如果有傳參數進來 if (args.Length != 0) { string userID = args[0]; string userName = args[1]; string txnID = args[2]; string txnName = args[3]; GlobalInfo.USER_ID = userID; GlobalInfo.USER_NAME = userName; if (userID.ToUpper() == GlobalDaoSetting.GetConnectionInfo.ConnectionName) { GlobalInfo.USER_DPT_ID = " "; } else { DataTable user = new UPF().ListDataByUserId(userID); GlobalInfo.USER_DPT_ID = user.Rows[0]["UPF_DPT_ID"].AsString(); } Application.Run(new FormMain(txnID, txnName)); } else { #if DEBUG Application.Run(new FormMain()); #else Application.Run(new FormLogin()); #endif } }