private void Login_Click() { if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } // if (!String.IsNullOrWhiteSpace(txtOperatorCD.Text)) if (ErrorCheck()) { //共通処理 受取パラメータ、接続情報 //コマンドライン引数より情報取得 //Iniファイルより情報取得 if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } try { var mse = loginbl.MH_Staff_LoginSelect(GetInfo()); if (mse.Rows.Count > 0) { if (mse.Rows[0]["MessageID"].ToString() == "Allow") { if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0) { var mseinfo = loginbl.M_Staff_InitSelect(GetInfo()); Capitalsports_MainMenu menuForm = new Capitalsports_MainMenu(GetInfo().StaffCD, mseinfo); this.Hide(); menuForm.ShowDialog(); this.Close(); } else { loginbl.ShowMessage("S018"); txtOperatorCD.Select(); } } else { loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString()); txtOperatorCD.Select(); } } else { loginbl.ShowMessage("E101"); txtOperatorCD.Select(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void Login_Click() { if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } if (!String.IsNullOrWhiteSpace(txtOperatorCD.Text)) { if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } var mse = loginbl.MH_Staff_LoginSelect(GetInfo()); if (mse.Rows.Count > 0) { if (mse.Rows[0]["MessageID"].ToString() == "Allow") { if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0) { var mseinfo = loginbl.M_Staff_InitSelect(GetInfo()); HapoStore_MainMenu hapomainmenu = new HapoStore_MainMenu(GetInfo().StaffCD, mseinfo); this.Hide(); hapomainmenu.ShowDialog(); this.Close(); } else { loginbl.ShowMessage("S018"); txtOperatorCD.Select(); } } else { loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString()); txtOperatorCD.Select(); } } else { loginbl.ShowMessage("E101"); txtOperatorCD.Select(); } } else { loginbl.ShowMessage("E101"); txtOperatorCD.Focus(); } }
private void Login_Click() { if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } if (ErrorCheck()) { //共通処理 受取パラメータ、接続情報 //コマンドライン引数より情報取得 //Iniファイルより情報取得 if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } var mse = loginbl.MH_Staff_LoginSelect(GetInfo()); if (mse.Rows.Count > 0) { if (mse.Rows[0]["MessageID"].ToString() == "Allow") { if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0) { var mseinfo = loginbl.M_Staff_InitSelect(GetInfo()); Main_Menu menuForm = new Main_Menu(GetInfo().StaffCD, mseinfo); this.Hide(); menuForm.ShowDialog(); this.Close(); } else { loginbl.ShowMessage("S018"); txtOperatorCD.Select(); } } else { loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString()); txtOperatorCD.Select(); } } else { loginbl.ShowMessage("E101"); txtOperatorCD.Select(); } } }
/// <summary> /// Login button click /// Check Operator Code & password /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnLogin_Click(object sender, EventArgs e) { //Base_BL bbl = new Base_BL(); //bbl.ShowMessage("I001", "テスト", "テスト1"); if (ErrorCheck()) { //共通処理 受取パラメータ、接続情報 //コマンドライン引数より情報取得 //Iniファイルより情報取得 if (loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } mse = loginbl.M_Staff_LoginSelect(GetInfo()); if (mse != null) { FrmMenu menuForm = new FrmMenu(mse); this.Hide(); menuForm.ShowDialog(); this.Close(); } else { loginbl.ShowMessage(""); txtOperatorCD.Select(); } } }
public static void Main(string[] args) { Console.Title = "JuchuuTorikomiWowma_受注取込(Wowma)"; if (loginbl.ReadConfig() == true) { mmpe.ID = "302"; mmpe.Key = "1"; dtMulti = wowmaAPI_bl.M_MultiPorpose_SelectID(mmpe); while (dtMulti.Rows[0]["Num1"].ToString().Equals("0")) { Console.WriteLine("Stop"); Thread.Sleep(Convert.ToInt32(dtMulti.Rows[0]["Num1"]) * 1000); dtMulti = wowmaAPI_bl.M_MultiPorpose_SelectID(mmpe); } DApiControl_entity.APIKey = "13"; dtApiControl = wowmaAPI_bl.D_APIControl_Select(DApiControl_entity); if (dtApiControl.Rows[0]["State"].ToString().Equals("0")) { Console.WriteLine("Stop"); Thread.Sleep(Convert.ToInt32(dtApiControl.Rows[0]["State"]) * 1000); dtApiControl = wowmaAPI_bl.D_APIControl_Select(DApiControl_entity); } api.GetOrderDetail_Wowma(DApiControl_entity); } }
static void Main(string[] args) { Console.Title = "EDINouhinJouhouTouroku"; if (loginbl.ReadConfig() == true) { mmpe.ID = "322"; mmpe.Key = "1"; dtMulti = edinjh_bl.M_MultiPorpose_SelectID(mmpe); //【起動可否確認】 //汎用マスター. 数字型1=0なら、処理終了 if (dtMulti.Rows[0]["Num1"].ToString().Equals("0")) { return; } //汎用マスター.文字型1で設定されたドライブ&フォルダー内に存在するサブフォルダーを順に確認し、そのフォルダー内に存在する //CSVファイル、Excelファイルを読み込む mmpe.Char1 = dtMulti.Rows[0]["Char1"].ToString(); mmpe.Char2 = dtMulti.Rows[0]["Char2"].ToString(); edijh.Import(mmpe); } }
static void Main(string[] args) { Console.Title = "ShukkaUriageUpdate"; if (loginbl.ReadConfig() == true) { mmpe.ID = MultiPorpose_BL.ID_ShukkaUriageUpdate; mmpe.Key = "1"; dtMulti = ediAPI_bl.M_MultiPorpose_SelectID(mmpe); //【起動可否確認】 //条件で獲得できる、汎用マスター.数字型1を、99:99の時刻形式に変換する string time = Convert.ToInt16(dtMulti.Rows[0]["Num1"]).ToString("D4"); time = time.Substring(0, 2) + ":" + time.Substring(2, 2); //今の時間が、その時刻より先であれば、以下の処理を行う。 string now = dtMulti.Rows[0]["HHMISS"].ToString().Substring(0, 5); int result = time.CompareTo(now); if (result > 0) { return; } //【データ更新】 D_Sales_Entity de = new D_Sales_Entity(); de.PC = Login_BL.GetHostName(); de.Operator = "Administrator"; api.ExecUpdate(de); } }
static void Main(string[] args) { Console.Title = "JuchuuTorikomiRakutenBaseballPlaza_受注取込(RakutenBaseballPlaza)"; if (loginbl.ReadConfig() == true) { mmpe.ID = "302"; mmpe.Key = "1"; dtMulti = rakutenAPI_bl.M_MultiPorpose_SelectID(mmpe); while (dtMulti.Rows[0]["Num1"].ToString().Equals("0")) { Console.WriteLine("Stop"); Thread.Sleep(Convert.ToInt32(dtMulti.Rows[0]["Num1"]) * 1000); dtMulti = rakutenAPI_bl.M_MultiPorpose_SelectID(mmpe); // select columns from M_Multiporpose table } DApiControl_entity.APIKey = "24"; dtApiControl = rakutenAPI_bl.D_APIControl_Select(DApiControl_entity); while (dtApiControl.Rows[0]["State"].ToString().Equals("0")) { Console.WriteLine("Stop"); Thread.Sleep(Convert.ToInt32(dtApiControl.Rows[0]["State"]) * 1000); dtApiControl = rakutenAPI_bl.D_APIControl_Select(DApiControl_entity); // select columns from D_APIControl table } api.Search_GetOrderDetail(DApiControl_entity); } }
private void Stop_DisplayService(bool isForced = true) { 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); } try { Kill("Display_Service"); } catch (Exception ex) { MessageBox.Show(ex.StackTrace.ToString()); } if (isForced) { cdo.SetDisplay(true, true, Base_DL.iniEntity.DefaultMessage); } //Base_DL.iniEntity.CDO_DISPLAY.SetDisplay(true, true,Base_DL.iniEntity.DefaultMessage); } }
static void Main(string[] args) { Console.Title = "JuchuuTorikomiYahoosportsPlaza_受注取込(YahoosportsPlaza)"; Console.WriteLine("Started " + Shopname + " . . . "); if (loginbl.ReadConfig() == true) { mmpe.ID = "302"; mmpe.Key = "1"; dtMulti = yahooAPI_bl.M_MultiPorpose_SelectID(mmpe); while (dtMulti.Rows[0]["Num1"].ToString().Equals("0")) { Console.WriteLine("Stop"); Thread.Sleep(Convert.ToInt32(dtMulti.Rows[0]["Num1"]) * 1000); dtMulti = yahooAPI_bl.M_MultiPorpose_SelectID(mmpe); // select columns from M_Multiporpose table } DApiControl_entity.APIKey = "2"; dtApiControl = yahooAPI_bl.D_APIControl_Select(DApiControl_entity); DApiControl_entity.LastGetDateTime = dtApiControl.Rows[0]["UpdateDateTime"].ToString(); while (dtApiControl.Rows[0]["State"].ToString().Equals("0")) { Console.WriteLine("Stop"); Thread.Sleep(Convert.ToInt32(dtApiControl.Rows[0]["State"]) * 1000); dtApiControl = yahooAPI_bl.D_APIControl_Select(DApiControl_entity); // select columns from D_APIControl table } api.ShopName = Shopname; api.Search_GetOrderDetail(DApiControl_entity); } }
static void Main(string[] args) { Console.Title = "EDIKaitouNoukiTouroku"; if (loginbl.ReadConfig() == true) { mmpe.ID = MultiPorpose_BL.ID_EDI; mmpe.Key = "1"; dtMulti = ediAPI_bl.M_MultiPorpose_SelectID(mmpe); //【起動可否確認】 //汎用マスター. 数字型1=0なら、処理終了 if (dtMulti.Rows[0]["Num1"].ToString().Equals("0")) { return; } //汎用マスター.文字型1で設定されたドライブ&フォルダー内に存在するサブフォルダーを順に確認し、そのフォルダー内に存在する //CSVファイル、Excelファイルを読み込む mmpe.Char1 = dtMulti.Rows[0]["Char1"].ToString(); mmpe.Char2 = dtMulti.Rows[0]["Char2"].ToString(); //api.OperatorCD = //【データ取得】 api.Import(mmpe); } }
private void Login_Click() { if (loginbl.ReadConfig() == false) { this.Close(); System.Environment.Exit(0); } if (ErrorCheck()) { if (loginbl.ReadConfig() == false) { this.Close(); System.Environment.Exit(0); } var mse = loginbl.MH_Staff_LoginSelect(GetInfo()); if (mse.Rows.Count > 0) { if (mse.Rows[0]["MessageID"].ToString() == "Allow") { if (loginbl.Check_RegisteredMenu(GetInfo()).Rows.Count > 0) { var mseinfo = loginbl.M_Staff_InitSelect(GetInfo()); Tennic_MainMenu menuForm = new Tennic_MainMenu(GetInfo().StaffCD, mseinfo); this.Hide(); menuForm.ShowDialog(); this.Close(); } else { loginbl.ShowMessage("S018"); txtOperatorCD.Select(); } } else { loginbl.ShowMessage(mse.Rows[0]["MessageID"].ToString()); txtOperatorCD.Select(); } } else { loginbl.ShowMessage("E101"); txtOperatorCD.Select(); } } }
public static void Main(string[] args) { try { cdo = new CashDrawerOpen(); //Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress); // Isset = args[0]; var f = ""; Login_BL lbl = new Login_BL();; if (lbl.ReadConfig()) { f = Base_DL.iniEntity.DefaultMessage; } else { f = "No Message at that moment. . . . . . . . . . . . . . . . "; } // cdo.RemoveDisplay(); long RD = 0; long SD = 0; while (true) { // Login_BL lbl = new Login_BL(); if (lbl.Display_Service_Status() == "0") { if (RD == 0) { cdo.RemoveDisplay(); } RD++; SD = 0; } else { if (SD == 0) { cdo.SetDisplay(true, true, f); } SD++; RD = 0; } Thread.Sleep(1500); } // // cdo.SetDisplay(false, false, "1233123","PPPPP","TTTTT"); //Start(); // Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress); } catch (Exception ex) { Console.WriteLine(ex.StackTrace + ex.Message); } Console.ReadLine(); //Start(); }
static void Main(string[] args) { Console.Title = "SKSMasterUpdate_SKS連携商基本商品"; string jsResult = string.Empty; if (loginbl.ReadConfig() == true) { jsResult = "{"; DataTable dtItem = sksMasterUpdate_bl.SKS_Item_Select(); DataTable dtMasterItem = new DataTable(); if (dtItem != null && dtItem.Rows.Count > 0) { dtMasterItem = dtItem.DefaultView.ToTable(true, "Item_Code"); jsResult += "\"item\":" + datatableToJason(dtItem) + ","; } else { jsResult += "\"item\":null,"; } DataTable dtSKU = sksMasterUpdate_bl.SKS_SKU_Select(); DataTable dtMasterSKU = dtSKU.DefaultView.ToTable(true, "Item_AdminCode"); if (dtSKU != null && dtSKU.Rows.Count > 0) { jsResult += "\"sku\":" + datatableToJason(dtSKU); } else { jsResult += "\"sku\":null"; } jsResult += "}"; if (ImportToSKS(jsResult)) { sksMasterUpdate_bl.SKSUpdateFlg_ForItem(dtMasterItem, dtMasterSKU); } } }
public static void Main(string[] args) { //GetOrderList(); Console.Title = "Ponpare API Console. . . "; Console.WriteLine("Started " + "Ponpare__API Started" + " . . . "); if (loginbl.ReadConfig() == true) { CommonAPI api = new CommonAPI(); _Ponpare_BL pbl = new _Ponpare_BL(); if (pbl.Allow_Check()) { api.GetOrder(); } else { Environment.Exit(0); } } }
static void Main(string[] args) { Console.Title = "FileTransferProtocolOutput"; if (loginbl.ReadConfig() == true) { mmpe.ID = "324"; mmpe.Key = "1"; dtMulti = ftpsbl.M_MultiPorpose_SelectID(mmpe); //【起動可否確認】 //汎用マスター. 数字型1=0なら、処理終了 if (dtMulti.Rows[0]["Num1"].ToString().Equals("0")) { return; } ftpo.FTPOutput(); } }
static void Main(string[] args) { Console.Title = "TempoRegiDataUpdate"; if (loginbl.ReadConfig() == true) { if (GetCmdLine() == false) { return; } D_Sales_Entity dse = new D_Sales_Entity(); dse.SalesNO = InSaleNO; dse.Operator = InOperatorCD; dse.PC = InPcID; dse.StoreCD = InStoreCD; exe.ExecUpdate(dse, Convert.ToInt32(InOperationMode)); } }
public static void Main(string[] args) { //GetOrderList(); Console.Title = "Amazon API Console. . . "; Console.WriteLine("Started " + "Amazon__API Started" + " . . . "); if (loginbl.ReadConfig() == true) { CommonAPI api = new CommonAPI(); Amazon__BL abl = new Amazon__BL(); if (abl.Allow_Check()) { api.ListOrders(); } else { Environment.Exit(0); } } }
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); } }
static void Main(string[] args) { Console.Title = "MailSend"; if (lgbl.ReadConfig() == true) { mmpe.ID = "325"; mmpe.Key = "1"; dtMulti = msbl.M_MultiPorpose_SelectID(mmpe); if (dtMulti.Rows[0]["Num1"].ToString().Equals("0"))//0なら、 処理終了 { Console.WriteLine("Stop"); } else { dtMail = msbl.D_Mail_Select(); string SenderServer = "", FromMail = "", ToMail = "", CCMail = "", BCCMail = "", FromPwd = "", AttServer = "", AttFolder = "", AttFileName = ""; int k = 0; if (dtMail.Rows.Count > 0) { MailMessage mm = new MailMessage(); FromMail = dtMail.Rows[0]["SenderAddress"].ToString(); FromPwd = dtMail.Rows[0]["Password"].ToString(); SenderServer = dtMail.Rows[0]["SenderServer"].ToString(); SmtpClient smtpServer = new SmtpClient(SenderServer); mm.From = new MailAddress(FromMail); mm.Subject = dtMail.Rows[0]["MailSubject"].ToString(); mm.Body = dtMail.Rows[0]["MailContent"].ToString(); for (int i = 0; i < dtMail.Rows.Count; i++) { if (dtMail.Rows[i]["AddressKBN"].ToString().Equals("1")) { ToMail = dtMail.Rows[i]["Address"].ToString(); mm.To.Add(ToMail); k++; } if (dtMail.Rows[i]["AddressKBN"].ToString().Equals("2")) { CCMail = dtMail.Rows[i]["Address"].ToString(); mm.CC.Add(CCMail); k++; } if (dtMail.Rows[i]["AddressKBN"].ToString().Equals("3")) { BCCMail = dtMail.Rows[i]["Address"].ToString(); mm.Bcc.Add(BCCMail); k++; } } AttServer = dtMail.Rows[0]["CreateServer"].ToString(); AttFolder = dtMail.Rows[0]["CreateFolder"].ToString(); AttFileName = dtMail.Rows[0]["FileName"].ToString(); string filepath = AttServer + "\\" + AttFolder + "\\" + AttFileName; if (File.Exists(filepath)) { mm.Attachments.Add(new Attachment(filepath)); } smtpServer.Port = 587; smtpServer.Credentials = new System.Net.NetworkCredential(mm.From.Address, FromPwd); smtpServer.EnableSsl = true; try { smtpServer.Send(mm); if (msbl.D_MailSend_Update(k)) { Console.WriteLine("メールのご送信が完了致しました。"); //Console.Read(); } } catch (Exception ex) { var er = ex.Message; } } } } }
/// <summary> /// 起動時共通処理 /// /// check Authorization /// insert to log(form open) /// </summary> /// <remarks>プログラム起動時に呼び出してください</remarks> protected void StartProgram() { //共通処理 受取パラメータ、接続情報 //コマンドライン引数より情報取得 //Iniファイルより情報取得 //this.GetCmdLine() == false || if (this.GetCmdLine() == false || loginbl.ReadConfig() == false) { //起動時エラー DB接続不可能 this.Close(); System.Environment.Exit(0); } //共通処理 Operator 確認 //[M_Staff] M_Staff_Entity mse = new M_Staff_Entity { StaffCD = InOperatorCD }; mse = loginbl.M_Staff_InitSelect(mse); // MessageBox.Show(bbl.GetConnectionString()); this.lblOperatorName.Text = mse.StaffName; //this.lblLoginDate.Text = mse.SysDate; DataTable dtShopName = bbl.SimpleSelect1("42", null, "222", "1"); this.lblShopName.Text = dtShopName.Rows[0]["Char1"].ToString(); M_Store_Entity mste = new M_Store_Entity { SysDate = mse.SysDate }; mste = loginbl.M_Store_InitSelect(mse, mste); this.lblStoreName.Text = mste.StoreName; StoreCD = mste.StoreCD; ChangeDate = mste.SysDate; //共通処理 プログラム //KTP - 2019-05-29 ProgramのチェックはM_Authorizations_AccessCheck にやっています。 //[M_Program] //mpe = new M_Program_Entity //{ // ProgramID = InProgramID, // Type = "1" //仮 //}; //bool ret = loginbl.M_Program_InitSelect(mpe); //if (ret == false) //{ // //S012 // bbl.ShowMessage("S012"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); //} //Authorizations判断 M_Authorizations_Entity mae; mae = new M_Authorizations_Entity { ProgramID = this.InProgramID, StaffCD = InOperatorCD, PC = InPcID }; made = bbl.M_Authorizations_AccessCheck(mae); if (made == null) { bbl.ShowMessage(mae.MessageID); //起動時エラー this.Close(); System.Environment.Exit(0); } //KTP 2019-05-29 Set ProgrameName, ProgramID this.Text = made.ProgramID; //lblHeaderTitle.Text = made.ProgramName; //KTP 2019-05-29 M_Authorizations_AccessCheckにやっています。 line no 513 to 521 //Program type判断 //switch (mpe.Type) //{ // case "1": // if (made.Insertable == "0" && made.Updatable == "0" && made.Deletable == "0" && made.Inquirable == "0") // { // //S003 // bbl.ShowMessage("S003"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); // } // break; // case "2": // if (made.Printable == "0") // { // //S003 // bbl.ShowMessage("S003"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); // } // break; // case "3": // if (made.Printable == "0" && made.Outputable == "0") // { // //S003 // bbl.ShowMessage("S003"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); // } // break; // case "4": // if (made.Outputable == "0") // { // //S003 // bbl.ShowMessage("S003"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); // } // break; // case "5": // if (made.Inquirable == "0") // { // //S003 // bbl.ShowMessage("S003"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); // } // break; // case "6": // if (made.Runable == "0") // { // //S003 // bbl.ShowMessage("S003"); // //起動時エラー // this.Close(); // System.Environment.Exit(0); // } // break; //} //処理可能店舗 //[M_StoreAuthorizations] M_StoreAuthorizations_Entity msa = new M_StoreAuthorizations_Entity(); msa.StoreAuthorizationsCD = made.StoreAuthorizationsCD; DataTable dt = bbl.M_StoreAuthorizations_Select(msa); if (dt.Rows.Count > 0) { availableStores = new string[dt.Rows.Count]; int i = 0; foreach (DataRow row in dt.Rows) { availableStores[i] = row["StoreCD"].ToString(); i++; } } ///Added by ETZ ,To close when StoreAuthorization isn't accessed else { bbl.ShowMessage(mae.MessageID); //起動時エラー this.Close(); System.Environment.Exit(0); } //プログラム起動履歴 //InsertLog(Get_L_Log_Entity(true)); //KTP 2019-05-29 Program Type Select from M_Authorizations_AccessCheck function //Todo:入力プログラム以外を考慮 //switch (mpe.Type) //switch (made.ProgramType) //{ // case "1": // if (made.Insertable == "1") // { // // 新規ボタン押下処理 // FunctionProcess((int)EOperationMode.INSERT); // } // else if (made.Updatable == "1") // { // // 修正ボタン押下処理 // FunctionProcess((int)EOperationMode.UPDATE); // } // else if (made.Deletable == "1") // { // // 削除ボタン押下処理 // FunctionProcess((int)EOperationMode.DELETE); // } // else // { // // 照会ボタン押下処理 // FunctionProcess((int)EOperationMode.SHOW); // } // break; //} }
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); } } }
static Form LoginFormName() { Form pgname = null; const string path = "ftp://202.223.48.145/Sync/"; Login_BL.SyncPath = path; const string localpath = @"C:\SMS\AppData\CKM.ini"; if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) { FTPData ftp = new FTPData(); if (!System.IO.File.Exists(localpath)) { FTPData.Download("CKM.ini", path, "Administrator", "c@p!+A1062O", @"C:\SMS\AppData\"); } //else //{ // ftp.UpdateSyncData("ftp://202.223.48.145/NewlyModified/"); // // Cursor = Cursors.WaitCursor; // // this.Cursor = Cursors.Default; //} Login_BL.Islocalized = false; } else { Login_BL.Islocalized = true; } if (lbl.ReadConfig()) { if (Base_DL.iniEntity.Login_Type == "CapitalMainMenuLogin") { pgname = new MainmenuLogin(); } else if (Base_DL.iniEntity.Login_Type == "HaspoMainMenuLogin") { pgname = new HaspoLogin(); } else if (Base_DL.iniEntity.Login_Type == "CapitalStoreMenuLogin") { // var f = Base_DL.iniEntity.IsDM_D30Used; pgname = new CapitalsportsLogin(); } else if (Base_DL.iniEntity.Login_Type == "HaspoStoreMenuLogin") { pgname = new Haspo.HaspoStoreMenuLogin(); } else if (Base_DL.iniEntity.Login_Type == "TennicMainMenuLogin") { pgname = new TennicLogin(); } else { MessageBox.Show("The program cannot initialize with the specified server instaces inside CKM.ini file. PLease fix ini file!!!!"); Environment.Exit(0); } } return(pgname); }