protected void InsertEFGH() { Base_BL bbl = new Base_BL(); _PonpareEntity _pet = GetPet(); var InsertRireki = pbl.InsertEFGH(_pet); }
public ShiireShoukaiDetails() { InitializeComponent(); dpd_entity = new D_Purchase_Details_Entity(); ssdbl = new ShiireShoukaiDetails_BL(); bbl = new Base_BL(); }
public Shiharai_ShimeShori() { InitializeComponent(); dtDisplay = new DataTable(); dpch_entity = new D_PayCloseHistory_Entity(); sss_bl = new Shiharai_Shimeshori_BL(); bbl = new Base_BL(); }
public UriageMotouchou() { InitializeComponent(); ume = new UriageMotochou_Entity(); lle = new L_Log_Entity(); bbl = new Base_BL(); umbl = new UriageMotochou_BL(); dtReport = new DataTable(); dtCheck = new DataTable(); }
public SiharaiItiranHyou() { InitializeComponent(); bbl = new Base_BL(); Ichiran_BL = new Shiharai_ItiranHyou_BL(); dpe = new D_Pay_Entity(); dt = new DataTable(); dtResult = new DataTable(); previewForm = new Viewer(); }
protected void InsertRirekiDetail(GetOrderNoWsvcRspBean OrderNos) //ABCD OrderNos.orderNoList[0] { int i = 0; foreach (string order in OrderNos.orderNoList) { i++; RirekiDetail.Rows.Add(new object[] { StoreCD, API_Key, i.ToString(), order }); } Base_BL bbl = new Base_BL(); var InsertRireki = pbl.InsertRirekiDetail(StoreCD, API_Key, fromDate, toDate, bbl.DataTableToXml(RirekiDetail)); }
//更新 ssa private void frmSearch_KeihiNO_Load(object sender, EventArgs e) { ExpenseNumber = string.Empty; skhnobl = new Search_KeihiNO_BL(); bbl = new Base_BL(); F9Visible = false; //chkPaid.Checked = true; //chkUnpaid.Checked = true; //chkTeiki.Checked = true; chkUnpaid.Checked = true; F11Visible = false; }
/// <summary> /// Constructor /// </summary> public CKM_TextBox() { this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Font = new System.Drawing.Font("MS Gothic", 9F, System.Drawing.FontStyle.Bold); bbl = new Base_BL(); //ToolTip tt = new ToolTip(); //tt.SetToolTip(this, "CKM"); //tt.IsBalloon = true; //tt.Show("Test ToolTip", this, 0, 0, 0); }
private void Tennic_MainMenu_FormClosing(object sender, FormClosingEventArgs e) { BL.Base_BL bbl = new Base_BL(); if (bbl.ShowMessage("Q003") == DialogResult.Yes) { e.Cancel = false; } else { e.Cancel = true; } }
public void Main_Menu_FormClosing(object sender, FormClosingEventArgs e) { BL.Base_BL bbl = new Base_BL(); if (bbl.ShowMessage("Q003") == DialogResult.Yes) { ForceToClose(); e.Cancel = false; } else { e.Cancel = true; } }
public SMS_ComboBox() { bbl = new Base_BL(); this.AutoCompleteMode = AutoCompleteMode.Suggest; this.AutoCompleteSource = AutoCompleteSource.CustomSource; this.Enter += cbo_Enter; this.Leave += cbo_Leave; // Required for ownerdraw this.DrawItem += new DrawItemEventHandler(EnableDisplayCombo_DrawItem); //// Required for ownerdraw this.DrawMode = DrawMode.OwnerDrawFixed; this.EnabledChanged += new EventHandler(EnableDisplayCombo_EnabledChanged); }
/// <summary> /// Confirm message on Menu FormClosing /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmMenu_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { Base_BL bbl = new Base_BL(); if (bbl.ShowMessage("Q003") == DialogResult.Yes) { e.Cancel = false; } else { e.Cancel = true; } } }
protected void Insert_Items(MarketplaceWebServiceOrders.MarketplaceWebServiceOrders client) { ListOrderItemsRequest request = new ListOrderItemsRequest(); request.SellerId = SellerId; Base_BL bbl = new Base_BL(); aml = new Amazon__BL(); Amazon_Juchuu_Items = D_AmazonJuchuuItems(); var dtAmazonOrderId = aml.Select_AllOrderByLastRireki(); int j = 0; int i = 0; foreach (DataRow dr in dtAmazonOrderId.Rows) { j++; request.AmazonOrderId = dr["AmazonOrderId"].ToString(); ListOrderItemsResponse response = client.ListOrderItems(request); if (response.IsSetListOrderItemsResult()) { ListOrderItemsResult listOrderItemsResult = response.ListOrderItemsResult; if (listOrderItemsResult.IsSetOrderItems()) { List <OrderItem> orderItems = listOrderItemsResult.OrderItems; foreach (OrderItem orderItem in orderItems) { i++; Amazon_Juchuu_Items_Add(request.AmazonOrderId, orderItem, j, i); // strbuff += "商品名:" + orderItem.Title + System.Environment.NewLine; } } } } Amazon__Entity ameDetails = new Amazon__Entity(); ameDetails.StoreCD = StoreCD; ameDetails.APIKey = APIKey; ameDetails.XmlOrderItems = bbl.DataTableToXml(Amazon_Juchuu_Items); if (aml.Amazon_InsertOrderItemDetails(ameDetails)) { Console.Write("All Items are Imported Successffully!!!"); Console.ReadLine(); } }
protected _PonpareEntity GetPet() { Base_BL bbl = new Base_BL(); pet = new _PonpareEntity() { StoreCD = StoreCD, APIKey = API_Key, fromDate = fromDate, toDate = toDate, Juchuu = bbl.DataTableToXml(Juchuu).Replace("]", "}").Replace("[", "{"), JuchuuDetails = bbl.DataTableToXml(JuchuuDetails).Replace("]", "}").Replace("[", "{"), Coupon = bbl.DataTableToXml(Coupon).Replace("]", "}").Replace("[", "{"), Enclose = bbl.DataTableToXml(Enclose).Replace("]", "}").Replace("[", "{"), }; return(pet); }
private async void PETC0303I_Import_Load(object sender, EventArgs e) { baseBL = new Base_BL(); NyuukinMeisai_data = new T_NyuukinMeisai_Entity(); PETC30303I = new PETC0303I_BL(); cmf = new CommonFunctions(); // psks0103ibl = new PSKS0103I_BL(); btnOK.Enabled = false; if (PETC30303I.PETC0303IDelete(LLogEntity)) { for (int i = 0; i < dgv1.Rows.Count; i++) { await Insert(i); } } btnOK.Enabled = true; }
protected void F12() { DialogResult dialogResult = MessageBox.Show("在庫データCSVを作成しますか?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dialogResult == DialogResult.OK) { if (!ErrorCheck()) { return; } Base_BL baseBL = new Base_BL(); Cursor = Cursors.WaitCursor; if (dtmain == null) { MessageBox.Show("Error in reading Files ... "); return; } var de = p10.T_SmileInsert(loginInfo.OperatorCode, baseBL.DataTableToXml(dtmain)); if (de) { if (String.IsNullOrEmpty(txtProcessNo.Text) && string.IsNullOrWhiteSpace(txtSlipNo.Text)) // first time to input { // } else { var dtsmile = p10.GetTSmile(); if (dtsmile.Rows.Count > 0) { if (Convert.ToInt64(txtProcessNo.Text) >= Convert.ToInt64(dtsmile.Rows[0]["ProcessNo"].ToString()) || Convert.ToDateTime(txtDate.Text) >= Convert.ToDateTime(dtsmile.Rows[0]["Date"].ToString())) { var msg = cmf.DSP_MSG("Q328", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); if (msg != "1") { Cursor = Cursors.Default;; txtDate.Focus(); return; } } } } var ds = p10.T_SmileHistoryInsert_Output(); ConmmaSplit(ds); var path = @"C:\SMS\PETC0310I\"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } try { var dtnow = DateTime.Now.ToString("yyyyMMdd HHmmss"); var fname = dtnow.Replace(" ", "_") + "_" + loginInfo.OperatorCode + "_" + Path.GetFileNameWithoutExtension(txtInput.Text) + ".CSV"; if (ds.Rows.Count > 0) { if (File.Exists(path + "\\" + fname)) { File.Delete(path + "\\" + fname); } ToCSV(ds, path + "\\" + fname);// For tennic } cmf.DSP_MSG("I201", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); Init(); Process.Start(Path.GetDirectoryName(path)); } catch (Exception ex) { MessageBox.Show(ex.Message); } } Cursor = Cursors.Arrow; //do something } else if (dialogResult == DialogResult.No) { return; //do something else } }
public void Insert_NextToken(string token = null) { Amazon_Juchuu_NextToken = D_AmazonJuchuu(); Base_BL bbl = new Base_BL(); DataTable strbuff = new DataTable(); strbuff.Columns.Add("StoreCD"); strbuff.Columns.Add("APIKey"); strbuff.Columns.Add("SEQ"); strbuff.Columns.Add("OrderId"); MarketplaceWebServiceOrdersConfig config = new MarketplaceWebServiceOrdersConfig(); config.ServiceURL = CommonValue.strServiceURL; MarketplaceWebServiceOrders.MarketplaceWebServiceOrders client = new MarketplaceWebServiceOrdersClient( AccessKeyId, SecretKeyId, ApplicationName, ApplicationVersion, config); if (token != null) { ListOrdersByNextTokenRequest request1 = new ListOrdersByNextTokenRequest(); ListOrdersByNextTokenResult listOrdersByNextResult = new ListOrdersByNextTokenResult(); request1.SellerId = SellerId; request1.MWSAuthToken = MWSAuthToken; request1.NextToken = token; ListOrdersByNextTokenResponse response1 = client.ListOrdersByNextToken(request1); if (response1.IsSetListOrdersByNextTokenResult()) { listOrdersByNextResult = response1.ListOrdersByNextTokenResult; if (listOrdersByNextResult.IsSetOrders()) { List <Order> orders = listOrdersByNextResult.Orders; int i = 0; foreach (Order o in orders) { i++; strbuff.Rows.Add(StoreCD, APIKey, i, o.AmazonOrderId); GetListOrderdata(o, i, false); } } } Amazon__Entity ameDetails = new Amazon__Entity(); ameDetails.StoreCD = StoreCD; ameDetails.APIKey = APIKey; ameDetails.LastUpdatedAfter = UpdatedTimeBefore.ToString(); ameDetails.LastUpdatedBefore = listOrdersByNextResult.LastUpdatedBefore.ToString(); ameDetails.Xmldetails = bbl.DataTableToXml(Amazon_Juchuu_NextToken); ameDetails.XmlOrder = bbl.DataTableToXml(strbuff); TokenNo = TokenNo + 1; if (aml.AmazonAPI_Insert_NextToken(ameDetails)) { Console.WriteLine("Successfully Inserted Token " + (TokenNo).ToString() + "Times"); } else { Console.WriteLine("Unfortunately Inserted Failed Token " + (TokenNo).ToString() + "Times"); } Insert_NextToken(listOrdersByNextResult.NextToken); } else/// To be Continued. . . Insert { Console.Write("Order inserted Successfully!!!"); Console.Read(); } }
/// <summary> /// Check Date /// </summary> private bool DateCheck() { bbl = new Base_BL(); if (!string.IsNullOrWhiteSpace(this.Text)) { if (bbl.IsInteger(this.Text.Replace("/", "").Replace("-", ""))) { string day = string.Empty, month = string.Empty, year = string.Empty; if (this.Text.Contains("/")) { string[] date = this.Text.Split('/'); day = date[date.Length - 1].PadLeft(2, '0'); month = date[date.Length - 2].PadLeft(2, '0'); if (date.Length > 2) { year = date[date.Length - 3]; } this.Text = year + month + day;// this.Text.Replace("/", ""); } else if (this.Text.Contains("-")) { string[] date = this.Text.Split('-'); day = date[date.Length - 1].PadLeft(2, '0'); month = date[date.Length - 2].PadLeft(2, '0'); if (date.Length > 2) { year = date[date.Length - 3]; } this.Text = year + month + day;// this.Text.Replace("-", ""); } string text = this.Text; text = text.PadLeft(8, '0'); day = text.Substring(text.Length - 2); month = text.Substring(text.Length - 4).Substring(0, 2); year = Convert.ToInt32(text.Substring(0, text.Length - 4)).ToString(); if (month == "00") { month = string.Empty; } if (year == "0") { year = string.Empty; } if (string.IsNullOrWhiteSpace(month)) { month = DateTime.Now.Month.ToString().PadLeft(2, '0');//if user doesn't input for month,set current month } if (string.IsNullOrWhiteSpace(year)) { year = DateTime.Now.Year.ToString();//if user doesn't input for year,set current year } else { if (year.Length == 1) { year = "200" + year; } else if (year.Length == 2) { year = "20" + year; } } //string strdate = year + "-" + month + "-" + day; 2019.6.11 chg string strdate = year + "/" + month + "/" + day; if (bbl.CheckDate(strdate)) { IsCorrectDate = true; this.Text = strdate; } else { ShowErrorMessage("E103"); return(false); } } else { ShowErrorMessage("E103"); return(false); } } return(true); }
public void ListOrders() { ame = new Amazon__Entity(); aml = new Amazon__BL(); ame = aml.MAPI_DRequest(); //string SellerId = CommonValue.strMerchantId; //string MarketplaceId = CommonValue.strMarketplaceId; //string AccessKeyId = CommonValue.strAccessKeyId; //string SecretKeyId = CommonValue.strSecretKeyId; //string ApplicationVersion = CommonValue.strApplicationVersion; //string ApplicationName = CommonValue.strApplicationName; //string MWSAuthToken = CommonValue.strMWSAuthToken; //string strbuff = string.Empty; SellerId = ame.strMerchantId; MarketplaceId = ame.strMarketplaceId; AccessKeyId = ame.strAccessKeyId; MWSAuthToken = ame.strMWSAuthToken; SecretKeyId = ame.strSecretKeyId; APIKey = ame.APIKey; StoreCD = ame.StoreCD; string ApplicationVersion = CommonValue.strApplicationVersion; string ApplicationName = CommonValue.strApplicationName; DataTable strbuff = new DataTable(); var LastUpdatedBefore = aml.Amazon_DRequest(); if (LastUpdatedBefore != null) { UpdatedTimeBefore = Convert.ToDateTime(LastUpdatedBefore).AddDays(-1); } else { UpdatedTimeBefore = DateTime.Now;; } MarketplaceWebServiceOrdersConfig config = new MarketplaceWebServiceOrdersConfig(); config.ServiceURL = CommonValue.strServiceURL; MarketplaceWebServiceOrders.MarketplaceWebServiceOrders client = new MarketplaceWebServiceOrdersClient( AccessKeyId, SecretKeyId, ApplicationName, ApplicationVersion, config); ListOrdersRequest request = new ListOrdersRequest(); request.SellerId = SellerId; request.LastUpdatedAfter = UpdatedTimeBefore; List <string> lstMarketplace = new List <string>(); lstMarketplace.Add(MarketplaceId); request.MarketplaceId = lstMarketplace; request.MWSAuthToken = MWSAuthToken; request.MaxResultsPerPage = 40; ListOrdersResponse response = client.ListOrders(request); ListOrdersResult listOrdersResult = new ListOrdersResult(); if (response.IsSetListOrdersResult()) { listOrdersResult = response.ListOrdersResult; if (listOrdersResult.IsSetOrders()) { List <Order> orders = listOrdersResult.Orders; strbuff.Columns.Add("StoreCD"); strbuff.Columns.Add("APIKey"); strbuff.Columns.Add("SEQ"); strbuff.Columns.Add("OrderId"); int i = 0; Amazon_Juchuu = D_AmazonJuchuu(); foreach (Order o in orders) { i++; strbuff.Rows.Add(StoreCD, APIKey, i, o.AmazonOrderId); GetListOrderdata(o, i); } } // txtListOrders.Text = strbuff; } Base_BL bbl = new Base_BL(); string OrderDetails = ""; string AmazonOrderId = ""; OrderDetails = bbl.DataTableToXml(Amazon_Juchuu); AmazonOrderId = bbl.DataTableToXml(strbuff); TokenNo = TokenNo + 1; Insert_FirstToken(listOrdersResult, OrderDetails, AmazonOrderId); if (listOrdersResult.NextToken != null) { Insert_NextToken(response.ListOrdersResult.NextToken); } Insert_Items(client); Console.Read(); // //else //{ // Console.Write("Order Inserted Successfully!!!"); // Console.Read(); //} }