private void Start_Display() { try { if (Base_DL.iniEntity.IsDM_D30Used) { Login_BL bbl_1 = new Login_BL(); if (bbl_1.ReadConfig()) { bbl_1.Display_Service_Update(false); Thread.Sleep(1 * 1000); bbl_1.Display_Service_Enabled(false); } else { bbl_1.Display_Service_Update(false); Thread.Sleep(1 * 1000); bbl_1.Display_Service_Enabled(false); } Kill("Display_Service"); } } catch (Exception ex) { MessageBox.Show("Cant remove on second time" + ex.StackTrace); } }
private void HaspoLogin_Load(object sender, EventArgs e) { loginbl = new Login_BL(); }
static void Main(string[] args) { Console.Title = "GetsujiShiireSyuukeiSyori"; if (loginbl.ReadConfig() == true) { //コマンドライン引数を配列で取得する string[] cmds = System.Environment.GetCommandLineArgs(); if (cmds.Length - 1 >= (int)FrmMainForm.ECmdLine.PcID + 1) { InOperatorCD = cmds[(int)FrmMainForm.ECmdLine.OperatorCD]; InStoreCD = cmds[(int)FrmMainForm.ECmdLine.PcID + 1]; InProcessMode = cmds[(int)FrmMainForm.ECmdLine.PcID + 2]; InFiscalYYYYMM = cmds[(int)FrmMainForm.ECmdLine.PcID + 3].Replace("/", ""); } gsbl = new GetsujiShimeShori_BL(); //処理モードを覚える M_Control_Entity mce = new M_Control_Entity(); mce.MainKey = "1"; Mode = gsbl.GetMode(mce); bool execFlg = false; M_StoreClose_Entity me = new M_StoreClose_Entity(); if (Mode.Equals(1)) { //Mode = 1 の場合 (=ALL店舗) } else if (Mode.Equals(2)) { //Mode = 2 の場合 (=店舗ごとに計算) me.StoreCD = InStoreCD; } bool ret = gsbl.M_StoreClose_SelectAll(me); if (ret) { //FiscalYYYYMM<Parameter受取 FiscalYYYYMM //またはFiscalYYYYMM=Parameter受取 FiscalYYYYMM& ClosePosition5=0なら if (gsbl.Z_Set(me.FiscalYYYYMM) <= gsbl.Z_Set(InFiscalYYYYMM)) { if (gsbl.Z_Set(me.FiscalYYYYMM) == gsbl.Z_Set(InFiscalYYYYMM)) { if (me.ClosePosition5.Equals("0")) { execFlg = true; } } else { execFlg = true; } InFiscalYYYYMM = me.FiscalYYYYMM; } } if (execFlg) { //【データ更新】 D_MonthlyPurchase_Entity de = new D_MonthlyPurchase_Entity { PC = Login_BL.GetHostName(), Operator = InOperatorCD, YYYYMM = InFiscalYYYYMM, StoreCD = InStoreCD, Mode = Mode }; api.ExecUpdate(de); } } }
private void Tennic_MainMenu_Load(object sender, EventArgs e) { loginbl = new Login_BL(); }
protected override void PrintSec() { DataTable dtForUpdate = null; try { // レコード定義を行う DataTable table = CheckData(out dtForUpdate); if (table == null) { return; } //Q205 if (bbl.ShowMessage("Q205") != DialogResult.Yes) { return; } //EXCEL出力 string filePath = ""; //出力ファイル名の決定 if (!ShowSaveFileDialog(InProgramNM, out filePath, 1)) { return; } // 実行モジュールと同一フォルダのファイルを取得 Login_BL loginbl = new Login_BL(); string templateFilePath = loginbl.GetInformationOfIniFileByKey(InProgramID); //テンプレートのファイル存在チェック if (!System.IO.File.Exists(templateFilePath)) { //Todo:変更 bbl.ShowMessage("E122"); return; } //テンプレートをコピーしてファイルを保存(上書きOK) System.IO.File.Copy(@templateFilePath, @filePath, true); //Excel出力 OutputExecelFromDataTable(table, filePath); //更新処理 //tableの見積番号だけ try { stbl.D_Purchase_Update(dpe, dtForUpdate); } catch (Exception ex) { var f = ex.Message; } //ログファイルへの更新 bbl.L_Log_Insert(Get_L_Log_Entity()); //ファイル出力が完了しました。 bbl.ShowMessage("I203"); } finally { DeleteExclusive(dtForUpdate); } //更新後画面そのまま detailControls[1].Focus(); }
public LoginController(Login_BL businessLogic) { _businessLogic = businessLogic; }
private void OpenForm(object sender) { try { var programID = (sender as CKM_Button).Text; var exe_name = menu.Select("ProgramID = '" + programID + "'").CopyToDataTable().Rows[0]["ProgramID_ID"].ToString(); if (Base_DL.iniEntity.IsDM_D30Used && exe_name == "CashDrawerOpen") { try { CashDrawerOpen cdo_open = new CashDrawerOpen(); cdo_open.OpenCashDrawer(); //Base_DL.iniEntity.CDO_DISPLAY = new EPSON_TM30.CashDrawerOpen(); ; //Base_DL.iniEntity.CDO_DISPLAY.OpenCashDrawer(); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } // op.OpenCashDrawer(); } else { //System.Uri u = new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase); //string filePath = System.IO.Path.GetDirectoryName(u.LocalPath); string filePath = ""; //System.Diagnostics.Debug if (Debugger.IsAttached || Login_BL.Islocalized) { System.Uri u = new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase); filePath = System.IO.Path.GetDirectoryName(u.LocalPath); } else { filePath = @"C:\\SMS\\AppData"; } string cmdLine = " " + "01" + " " + mse.StaffCD + " " + Login_BL.GetHostName(); //Process[] localByName = Process.GetProcessesByName(exe_name); //if (localByName.Count() > 0) //{ // IntPtr handle = localByName[0].MainWindowHandle; // ShowWindow(handle, SW_SHOWMAXIMIZED); // return; //} //if (exe_name == "TempoRegiHanbaiTouroku" ) //{ // try // { // if (Base_DL.iniEntity.IsDM_D30Used) // { // cdo.RemoveDisplay(); // } // // Base_DL.Ini_Entity_CDP.CDO_DISPLAY.RemoveDisplay(); // } // catch // { // MessageBox.Show("Reclick on HBT"); // } //} RejectDisplay(exe_name); Process[] localByName = Process.GetProcessesByName(exe_name); if (localByName.Count() > 0) { //if (programID.TrimEnd() == "販売登録" || exe_name == "TempoRegiHanbaiTouroku" || exe_name == "TempoRegiHanbaiTouroku.exe") //{ // // Login_BL bbl_1 = new Login_BL(); // // bbl_1.Display_Service_Update(false); //} IntPtr handle = localByName[0].MainWindowHandle; ShowWindow(handle, SW_SHOWMAXIMIZED); SetForegroundWindow(handle); return; } //if (P) // (sender as CKM_Button).Tag = System.Diagnostics.Process.Start(filePath + @"\" + exe_name + ".exe", cmdLine + ""); //original ///ptk /// (sender as CKM_Button).Tag = System.Diagnostics.Process.Start(filePath + @"\" + exe_name + ".exe", cmdLine + ""); //if (programID.TrimEnd() == "販売登録" || exe_name == "TempoRegiHanbaiTouroku") //{ // try // { // using (Process exeProcess = Process.Start(filePath + @"\" + exe_name + ".exe", cmdLine + "")) // { // if (Base_DL.iniEntity.IsDM_D30Used) // { // exeProcess.WaitForExit(); // cdo.SetDisplay(true, true, Base_DL.iniEntity.DefaultMessage); // } // } // } // catch (Exception ex) // { // MessageBox.Show(ex.Message + filePath + @"\" + exe_name + ".exe"); // } //} //else //{ (sender as CKM_Button).Tag = System.Diagnostics.Process.Start(filePath + @"\" + exe_name + ".exe", cmdLine + ""); //} ///ptk } } catch (Exception ex) { MessageBox.Show("The program cannot locate to the specified file!!!"); } }