public DataTable PSKS0116I_M_SiiresakiZaiko_Select(M_SiiresakiZaiko_Entity msze) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("@SiiresakiCD", msze.SiiresakiCD); return(SelectData(dic, "PSKS0116I_M_SiiresakiZaiko_Select")); }
public bool Delete_BeforeImoprt(T_MakerZaiko_Entity tmze)//取込前データ削除 { M_SiiresakiZaiko_DL mszdl = new M_SiiresakiZaiko_DL(); M_SiiresakiZaiko_Entity msze = new M_SiiresakiZaiko_Entity(); T_MakerZaiko_DL tmzdl = new T_MakerZaiko_DL(); msze.SiiresakiCD = tmze.MakerCD; DataTable dt = mszdl.M_SiiresakiZaiko_Select(msze);//確定済の判断 if (dt.Rows.Count > 0) { if (dt.Rows[0]["TorikomiFixedFLG"].ToString() == "1")//TorikomiFixedFLG == 1なら(確定済) { tmzdl.Transaction = psks0103idl.Transaction; if (tmzdl.T_MakerZaiko_DELETE(tmze))//既存データ削除 { tmze.InsertDateTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); if (!tmzdl.T_MakerZaiko_Insert(tmze)) { return(false); } } else { return(false); } } } return(true); }
public bool M_SiiresakiZaiko_Update(M_SiiresakiZaiko_Entity msze) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("@MakerCD", msze.SiiresakiCD); dic.Add("@KakuTeiFlg", msze.KakuTeiFlg); dic.Add("@InsertDateTime", msze.InsertDateTime); dic.Add("@FileKBN", msze.FileKBN); return(InsertUpdateDeleteData(dic, "M_SiiresakiZaiko_Update")); }
/// <summary>change file type /// Update File type to database /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cboFileType_SelectedIndexChanged(object sender, EventArgs e) { if (cboFileType.SelectedValue != null && cboFileType.SelectedValue.ToString() != "System.Data.DataRowView") { msze = new M_SiiresakiZaiko_Entity(); msze.SiiresakiCD = ucSupplier.UC_Code; msze.FileKBN = cboFileType.SelectedValue.ToString(); psks0103ibl.M_SiiresakiZaiko_Update(msze); } }
private void ucSupplier_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (!string.IsNullOrWhiteSpace(ucSupplier.UC_Code)) { if (ucSupplier.SelectData()) { msze = new M_SiiresakiZaiko_Entity(); msze.SiiresakiCD = ucSupplier.UC_Code; DataTable dt = psks0104ibl.M_SiiresakiZaiko_Select(msze); if (dt.Rows.Count > 0) { if (dt.Rows[0]["TorikomiFixedFLG"].ToString() == "1") { KakuteiModeChange(true); } else { KakuteiModeChange(false); } } } else { DSP_MSG("E101", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); lblKakuteiMode.Text = ""; lblKakuteiMode.BackColor = Color.FromArgb(0, 176, 240); btnKakutei.Enabled = true; btnMiKakutei.Enabled = true; } } else { DSP_MSG("E102", "名前", string.Empty, string.Empty, string.Empty, string.Empty); ucSupplier.SetFocus(); } } }
public DataTable M_SiiresakiZaiko_Select(M_SiiresakiZaiko_Entity MSiireiSaki_Data) { M_SiiresakiZaiko_DL mszdl = new M_SiiresakiZaiko_DL(); return(mszdl.PSKS0116I_M_SiiresakiZaiko_Select(MSiireiSaki_Data)); }
/// <summary>set import data /// /// </summary> private void getInfo() { if (ucSupplier.UC_Exists) { msze = new M_SiiresakiZaiko_Entity(); msze.SiiresakiCD = ucSupplier.UC_Code; DataTable dt = psks0103ibl.M_SiiresakiZaiko_Select(msze); if (dt.Rows.Count > 0) { cboPatternCD.DataSource = dt; cboPatternCD.DisplayMember = "PatternCD"; cboPatternCD.ValueMember = "PatternName"; lblFormatCD.Text = dt.Rows[0]["PatternCD"].ToString(); lblFormatName.Text = dt.Rows[0]["PatternName"].ToString(); lblTroikomiFile.Text = "ファイル名が" + dt.Rows[0]["FileNameWord"].ToString() + "から始まるファイルを取込する。"; BindFileType(); if (dt.Rows[0]["FileKBN"].ToString().Equals("CSV")) /// 2 is for excel(xlsx) and 1 is for csv { cboFileType.SelectedValue = 1; // csv } else { cboFileType.SelectedValue = 2; // excel } lblHiddenKubun.Text = dt.Rows[0]["FirstRecordKBN"].ToString(); FileName = dt.Rows[0]["FileNameWord"].ToString(); if (!ucSupplier.Enabled) { btnImport.Enabled = false; FunctionButtonDisabled(12); } else { btnImport.Enabled = true; FunctionButtonEnabled(12); } } else { lblFormatCD.Text = ""; lblFormatName.Text = ""; lblTroikomiFile.Text = "ファイル名がxxxから始まるファイルを取込する。"; lblFileType.Text = ". . ."; cboPatternCD.DataSource = null; cboFileType.DataSource = null; if (!ucSupplier.Enabled) { btnImport.Enabled = false; FunctionButtonDisabled(12); } } InportRireki_Select(); //ktp 2018/12/31 no need to disable on any condition ucSupplier.Disabled(); } else { if (!ucSupplier.Enabled) { btnImport.Enabled = false; FunctionButtonDisabled(12); } } dgvFileDetail.DataSource = null; InportSEQ = string.Empty; }
public bool M_SiiresakiZaiko_Update(M_SiiresakiZaiko_Entity msze) { return(mszdl.M_SiiresakiZaiko_Update(msze)); }
public DataTable M_SiiresakiZaiko_Select(M_SiiresakiZaiko_Entity MSiireiSaki_Data) { return(mszdl.M_SiiresakiZaiko_Select(MSiireiSaki_Data)); }
private void ucSupplier_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { #region ***BugNo1*** if (string.IsNullOrWhiteSpace(ucSupplier.UC_Code)) { DSP_MSG("E102", "名前", string.Empty, string.Empty, string.Empty, string.Empty); ucSupplier.SetFocus(); return; } #endregion if (ucSupplier.SelectData()) { msze = new M_SiiresakiZaiko_Entity(); msze.SiiresakiCD = ucSupplier.UC_Code; DataTable dt = pskso116ibl.M_SiiresakiZaiko_Select(msze); if (dt.Rows.Count > 0) { lblFormatCD.Text = dt.Rows[0]["PatternCD"].ToString(); lblFormatName.Text = dt.Rows[0]["PatternName"].ToString(); lblTroikomiFile.Text = "ファイル名が" + dt.Rows[0]["FileNameWord"].ToString() + "から始まるファイルを取込する。"; lblFileType.Text = dt.Rows[0]["FileKBN"].ToString(); lblHiddenKubun.Text = dt.Rows[0]["FirstRecordKBN"].ToString(); FileName = dt.Rows[0]["FileNameWord"].ToString(); btnImport.Enabled = true; FunctionButtonEnabled(12); } else { lblFormatCD.Text = ""; lblFormatName.Text = ""; lblTroikomiFile.Text = "ファイル名がxxxから始まるファイルを取込する。"; lblFileType.Text = ". . ."; btnImport.Enabled = false; FunctionButtonDisabled(12); } InportRireki_Select(); //ktp 2018/12/31 no need to disable on any condition ucSupplier.Disabled(); } else { DSP_MSG("E101", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); btnImport.Enabled = false; FunctionButtonDisabled(12); dgvImportRireki.DataSource = null; } dgvFileDetail.DataSource = null; Chk_flg = false; InportSEQ = string.Empty; } //else //{ // lblFormatCD.Text = ""; // lblFormatName.Text = ""; // lblTroikomiFile.Text = "ファイル名がxxxから始まるファイルを取込する。"; // lblFileType.Text = ". . ."; // btnImport.Enabled = false; // FunctionButtonDisabled(12); // Chk_flg = false; //} }