Esempio n. 1
0
        public bool M_Vendor_Delete(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.ChangeDate
                  } },
                { "@Operator", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.InsertOperator
                  } },
                { "@Program", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.ProgramID
                  } },
                { "@PC", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.PC
                  } },
                { "@OperateMode", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.ProcessMode
                  } },
                { "@KeyItem", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD + "" + mve.ChangeDate
                  } },
            };

            UseTransaction = true;
            return(InsertUpdateDeleteData(dic, "M_Vendor_Delete"));
        }
Esempio n. 2
0
        public DataTable M_Vendor_Search(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mve.ChangeDate
                  } },
                { "@DisplayKBN", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.DisplayKBN
                  } },
                { "@VendorCDFrom", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCDFrom
                  } },
                { "@VendorCDTo", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCDTo
                  } },
                { "@VendorName", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorName
                  } },
                { "@VendorKana", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorKana
                  } },
                { "@DeleteFlg", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.DeleteFlg
                  } },
            };

            UseTransaction = true;
            return(SelectData(dic, "M_Vendor_Search"));
        }
Esempio n. 3
0
        /// <summary>
        /// 表示ボタンを押下時GridViewにデータを表示する処理
        /// </summary>

        private void F11()
        {
            dgvPurchaseSearch.DataSource = null;
            if (ErrorCheck())
            {
                if (!string.IsNullOrWhiteSpace(scSupplier.TxtCode.Text))
                {
                    M_Vendor_Entity mve = new M_Vendor_Entity()
                    {
                        VendorCD   = scSupplier.TxtCode.Text,
                        ChangeDate = scSupplier.ChangeDate.ToString()
                    };
                    string aa = scSupplier.TxtCode.Text;
                    payeeflg = dpurchase_bl.SelectPayeeFlg(mve);
                }
                dpde = GetSearchInfo();

                DataTable dtPurchase = dpurchase_bl.D_Purchase_Search(dpde);

                if (dtPurchase.Rows.Count > 0)
                {
                    dgvPurchaseSearch.Refresh();
                    dgvPurchaseSearch.DataSource = dtPurchase;
                    dgvPurchaseSearch.Enabled    = true;
                    dgvPurchaseSearch.Focus();
                    Btn_F10.Enabled = true;
                }
                else
                {
                    dpurchase_bl.ShowMessage("E128");
                    dgvPurchaseSearch.DataSource = null;
                }
            }
        }
        public bool M_Vendor_SelectTop1(M_Vendor_Entity mve)
        {
            DataTable dt = mvdl.M_Vendor_SelectTop1(mve);

            if (dt.Rows.Count > 0)
            {
                mve.VendorCD           = dt.Rows[0]["VendorCD"].ToString();
                mve.VendorName         = dt.Rows[0]["VendorName"].ToString();
                mve.ShoguchiFlg        = dt.Rows[0]["ShoguchiFlg"].ToString();
                mve.VendorLongName1    = dt.Rows[0]["VendorLongName1"].ToString();
                mve.VendorLongName2    = dt.Rows[0]["VendorLongName2"].ToString();
                mve.VendorPostName     = dt.Rows[0]["VendorPostName"].ToString();
                mve.VendorPositionName = dt.Rows[0]["VendorPositionName"].ToString();
                mve.VendorStaffName    = dt.Rows[0]["VendorStaffName"].ToString();
                mve.VendorKana         = dt.Rows[0]["VendorKana"].ToString();
                mve.VendorFlg          = dt.Rows[0]["VendorFlg"].ToString();
                mve.PayeeFlg           = dt.Rows[0]["PayeeFlg"].ToString();
                mve.MoneyPayeeFlg      = dt.Rows[0]["MoneyPayeeFlg"].ToString();
                mve.PayeeCD            = dt.Rows[0]["PayeeCD"].ToString();
                mve.MoneyPayeeCD       = dt.Rows[0]["MoneyPayeeCD"].ToString();
                mve.ZipCD1             = dt.Rows[0]["ZipCD1"].ToString();
                mve.ZipCD2             = dt.Rows[0]["ZipCD2"].ToString();
                mve.Address1           = dt.Rows[0]["Address1"].ToString();
                mve.Address2           = dt.Rows[0]["Address2"].ToString();
                mve.MailAddress1       = dt.Rows[0]["MailAddress1"].ToString();
                mve.MailAddress2       = dt.Rows[0]["MailAddress2"].ToString();
                mve.MailAddress3       = dt.Rows[0]["MailAddress3"].ToString();
                mve.TelephoneNO        = dt.Rows[0]["TelephoneNO"].ToString();
                mve.FaxNO             = dt.Rows[0]["FaxNO"].ToString();
                mve.PaymentCloseDay   = dt.Rows[0]["PaymentCloseDay"].ToString();
                mve.PaymentPlanKBN    = dt.Rows[0]["PaymentPlanKBN"].ToString();
                mve.PaymentPlanDay    = dt.Rows[0]["PaymentPlanDay"].ToString();
                mve.HolidayKBN        = dt.Rows[0]["HolidayKBN"].ToString();
                mve.BankCD            = dt.Rows[0]["BankCD"].ToString();
                mve.BranchCD          = dt.Rows[0]["BranchCD"].ToString();
                mve.KouzaKBN          = dt.Rows[0]["KouzaKBN"].ToString();
                mve.KouzaNO           = dt.Rows[0]["KouzaNO"].ToString();
                mve.KouzaMeigi        = dt.Rows[0]["KouzaMeigi"].ToString();
                mve.KouzaCD           = dt.Rows[0]["KouzaCD"].ToString();
                mve.TaxTiming         = dt.Rows[0]["TaxTiming"].ToString();
                mve.TaxFractionKBN    = dt.Rows[0]["TaxFractionKBN"].ToString();
                mve.AmountFractionKBN = dt.Rows[0]["AmountFractionKBN"].ToString();
                mve.NetFlg            = dt.Rows[0]["NetFlg"].ToString();
                mve.EDIFlg            = dt.Rows[0]["EDIFlg"].ToString();
                mve.LastOrderDate     = dt.Rows[0]["LastOrderDate"].ToString();
                mve.StaffCD           = dt.Rows[0]["StaffCD"].ToString();
                mve.AnalyzeCD1        = dt.Rows[0]["AnalyzeCD1"].ToString();
                mve.AnalyzeCD2        = dt.Rows[0]["AnalyzeCD2"].ToString();
                mve.AnalyzeCD3        = dt.Rows[0]["AnalyzeCD3"].ToString();
                mve.DisplayOrder      = dt.Rows[0]["DisplayOrder"].ToString();
                mve.NotDisplyNote     = dt.Rows[0]["NotDisplyNote"].ToString();
                mve.DisplayNote       = dt.Rows[0]["DisplayNote"].ToString();
                mve.DeleteFlg         = dt.Rows[0]["DeleteFlg"].ToString();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 5
0
        public M_Vendor_Entity M_Vendor_Select(M_Vendor_Entity mve)
        {
            DataTable dtVendor = mvdl.M_Vendor_Select(mve);

            if (dtVendor.Rows.Count > 0)
            {
                mve.ShoguchiFlg        = dtVendor.Rows[0]["ShoguchiFlg"].ToString();
                mve.VendorName         = dtVendor.Rows[0]["VendorName"].ToString();
                mve.VendorShortName    = dtVendor.Rows[0]["VendorShortName"].ToString(); // Add By SawLay
                mve.VendorKana         = dtVendor.Rows[0]["VendorKana"].ToString();
                mve.VendorLongName1    = dtVendor.Rows[0]["VendorLongName1"].ToString();
                mve.VendorLongName2    = dtVendor.Rows[0]["VendorLongName2"].ToString();
                mve.VendorPostName     = dtVendor.Rows[0]["VendorPostName"].ToString();
                mve.VendorPositionName = dtVendor.Rows[0]["VendorPositionName"].ToString();
                mve.VendorStaffName    = dtVendor.Rows[0]["VendorStaffName"].ToString();
                mve.ZipCD1             = dtVendor.Rows[0]["ZipCD1"].ToString();
                mve.ZipCD2             = dtVendor.Rows[0]["ZipCD2"].ToString();
                mve.Address1           = dtVendor.Rows[0]["Address1"].ToString();
                mve.Address2           = dtVendor.Rows[0]["Address2"].ToString();
                mve.MailAddress1       = dtVendor.Rows[0]["MailAddress1"].ToString();
                mve.TelephoneNO        = dtVendor.Rows[0]["TelephoneNO"].ToString();
                mve.FaxNO             = dtVendor.Rows[0]["FaxNO"].ToString();
                mve.PayeeCD           = dtVendor.Rows[0]["PayeeCD"].ToString();
                mve.payeeName         = dtVendor.Rows[0]["payeeName"].ToString();
                mve.MoneyPayeeCD      = dtVendor.Rows[0]["MoneyPayeeCD"].ToString();
                mve.moneypayeeName    = dtVendor.Rows[0]["moneypayeeName"].ToString();
                mve.PaymentCloseDay   = dtVendor.Rows[0]["PaymentCloseDay"].ToString();
                mve.PaymentPlanKBN    = dtVendor.Rows[0]["PaymentPlanKBN"].ToString();
                mve.PaymentPlanDay    = dtVendor.Rows[0]["PaymentPlanDay"].ToString();
                mve.HolidayKBN        = dtVendor.Rows[0]["HolidayKBN"].ToString();
                mve.TaxTiming         = dtVendor.Rows[0]["TaxTiming"].ToString();
                mve.TaxFractionKBN    = dtVendor.Rows[0]["TaxFractionKBN"].ToString();
                mve.AmountFractionKBN = dtVendor.Rows[0]["AmountFractionKBN"].ToString();
                mve.BankCD            = dtVendor.Rows[0]["BankCD"].ToString();
                mve.BankName          = dtVendor.Rows[0]["BankName"].ToString();
                mve.BranchCD          = dtVendor.Rows[0]["BranchCD"].ToString();
                mve.BranchName        = dtVendor.Rows[0]["BranchName"].ToString();
                mve.KouzaKBN          = dtVendor.Rows[0]["KouzaKBN"].ToString();
                mve.KouzaNO           = dtVendor.Rows[0]["KouzaNO"].ToString();
                mve.KouzaMeigi        = dtVendor.Rows[0]["KouzaMeigi"].ToString();
                mve.KouzaCD           = dtVendor.Rows[0]["KouzaCD"].ToString();
                mve.KouzaName         = dtVendor.Rows[0]["KouzaName"].ToString();
                mve.NetFlg            = dtVendor.Rows[0]["NetFlg"].ToString();
                mve.EDIFlg            = dtVendor.Rows[0]["EDIFlg"].ToString();
                mve.EDIVendorCD       = dtVendor.Rows[0]["EDIVendorCD"].ToString();
                mve.StaffCD           = dtVendor.Rows[0]["StaffCD"].ToString();
                mve.StaffName         = dtVendor.Rows[0]["StaffName"].ToString();
                mve.AnalyzeCD1        = dtVendor.Rows[0]["AnalyzeCD1"].ToString();
                mve.AnalyzeCD2        = dtVendor.Rows[0]["AnalyzeCD2"].ToString();
                mve.AnalyzeCD3        = dtVendor.Rows[0]["AnalyzeCD3"].ToString();
                mve.DisplayOrder      = dtVendor.Rows[0]["DisplayOrder"].ToString();
                mve.DisplayNote       = dtVendor.Rows[0]["DisplayNote"].ToString();
                mve.NotDisplyNote     = dtVendor.Rows[0]["NotDisplyNote"].ToString();
                mve.DeleteFlg         = dtVendor.Rows[0]["DeleteFlg"].ToString();

                return(mve);
            }
            return(null);
        }
 public MasterTouroku_ShiireKakeritsu()
 {
     InitializeComponent();
     mskbl  = new MasterTouroku_ShiireKakeritsu_BL();
     moe    = new M_OrderRate_Entity();
     mve    = new M_Vendor_Entity();
     mbe    = new M_Brand_Entity();
     dvMain = new DataView();
 }
 private void F11()
 {
     if (ErrorCheck())
     {
         mve = GetData();
         DataTable dt = new DataTable();
         dt = ssbl.M_Vendor_Search(mve);
         gvSupplier.DataSource = dt;
     }
 }
        public String SelectPayeeFlg(M_Vendor_Entity mve)
        {
            DataTable dt = mv_dl.M_Vendor_PayeeFlg_Select(mve);

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["PayeeFlg"].ToString());
            }
            return(string.Empty);
        }
Esempio n. 9
0
        public DataTable M_Vendor_PayeeFlg_Select(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD
                  } },
            };

            UseTransaction = true;
            return(SelectData(dic, "M_Vendor_PayeeFlg_Select"));
        }
 private M_Vendor_Entity GetData()
 {
     mve = new M_Vendor_Entity
     {
         ChangeDate   = lblChangeDate.Text,
         DisplayKBN   = radioButton1.Checked ? "0" : "1",
         VendorCDFrom = txtSupplierFrom.Text,
         VendorCDTo   = txtSupplierTo.Text,
         VendorName   = txtSupplierName.Text,
         VendorKana   = txtKanaName.Text,
         DeleteFlg    = "0",
     };
     return(mve);
 }
Esempio n. 11
0
        public M_Vendor_Entity M_Vendor_IsExists(M_Vendor_Entity mve)
        {
            M_Vendor_DL mvdl     = new M_Vendor_DL();
            DataTable   dtVendor = mvdl.M_Vendor_IsExists(mve);

            if (dtVendor.Rows.Count <= 0)
            {
                return(null);
            }
            else
            {
                mve.VendorName = dtVendor.Rows[0]["VendorName"].ToString();
                return(mve);
            }
        }
Esempio n. 12
0
        public DataTable MoneyPayee_Select(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.MoneyPayeeCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mve.ChangeDate
                  } }
            };

            UseTransaction = true;
            return(SelectData(dic, "MoneyPayee_Select"));
        }
Esempio n. 13
0
        public DataTable M_Vendor_SelectForPayeeCD(M_Vendor_Entity mve)
        {
            string sp = "M_Vendor_SelectForPayeeCD";
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.ChangeDate
                  } }
            };

            return(SelectData(dic, sp));
        }
Esempio n. 14
0
        public DataTable M_Vendor_DataSelect(M_Vendor_Entity mve)   // For NyuukaShoukai (pnz)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mve.ChangeDate
                  } }
            };

            UseTransaction = true;
            return(SelectData(dic, "M_Vendor_DataSelect"));
        }
Esempio n. 15
0
        public bool M_Vendor_Search(M_Vendor_Entity mve)
        {
            DataTable dt = mvdl.M_Vendor_Search(mve);

            if (dt.Rows.Count > 0)
            {
                mve.VendorCD   = dt.Rows[0]["VendorCD"].ToString();
                mve.VendorName = dt.Rows[0]["VendorName"].ToString();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 16
0
        public DataTable M_Vendor_IsExists(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>();

            dic.Add("@VendorCD", new ValuePair {
                value1 = SqlDbType.VarChar, value2 = mve.VendorCD
            });
            dic.Add("@ChangeDate", new ValuePair {
                value1 = SqlDbType.Date, value2 = mve.ChangeDate
            });
            dic.Add("@DeleteFlg", new ValuePair {
                value1 = SqlDbType.TinyInt, value2 = mve.DeleteFlg
            });
            UseTransaction = true;
            return(SelectData(dic, "M_Vendor_IsExists"));
        }
Esempio n. 17
0
        public bool M_Vendor_SelectForPayeeCD(M_Vendor_Entity mve)
        {
            DataTable dt = mvdl.M_Vendor_SelectForPayeeCD(mve);

            if (dt.Rows.Count > 0)
            {
                mve.VendorCD   = dt.Rows[0]["VendorCD"].ToString();
                mve.VendorName = dt.Rows[0]["VendorName"].ToString();
                mve.TaxTiming  = dt.Rows[0]["TaxTiming"].ToString();

                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 18
0
        public DataTable M_Vendor_SelectForSiharaiNyuuroku(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mve.ChangeDate
                  } },
                { "@MoneyPayeeFlg", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mve.MoneyPayeeFlg
                  } }
            };

            UseTransaction = true;
            return(SelectData(dic, "M_Vendor_SelectForSiharaiNyuuroku"));
        }
 private void F11()
 {
     if (ErrorCheck())
     {
         mve = GetSearchInfo();
         DataTable dt = vbl.M_SearchVendor(mve);
         if (dt.Rows.Count > 0)
         {
             dgvSearchVendor.DataSource = dt;
         }
         else
         {
             vbl.ShowMessage("E128");
             dgvSearchVendor.DataSource = null;
             txtChangeDate.Focus();
         }
     }
 }
 private M_Vendor_Entity GetSearchInfo()
 {
     string[] strlist = txtNotDisplayNote.Text.Split(',');
     mve = new M_Vendor_Entity()
     {
         VendorKBN     = lblVendorKBN.Text,
         ChangeDate    = txtChangeDate.Text,
         VendorName    = txtVendorName.Text,
         VendorKana    = txtVendorKana.Text,
         NotDisplyNote = txtNotDisplayNote.Text,
         VendorCDFrom  = txtSupplierNoFrom.Text,
         VendorCDTo    = txtSupplierNoTo.Text,
         Keyword1      = (strlist.Length > 0) ? strlist[0].ToString() : "",
         Keyword2      = (strlist.Length > 1) ? strlist[1].ToString() : "",
         Keyword3      = (strlist.Length > 2) ? strlist[2].ToString() : "",
     };
     return(mve);
 }
        private bool CheckDetail(int index)
        {
            switch (index)
            {
            case (int)EIndex.MakerCD:
                //入力なければチェックなし
                if (detailControls[index].Text == "")
                {
                    ScMaker.LabelText = "";
                    return(true);
                }
                else
                {
                    //仕入先マスタデータチェック
                    Vendor_BL       mbl = new Vendor_BL();
                    M_Vendor_Entity mse = new M_Vendor_Entity
                    {
                        VendorCD   = detailControls[index].Text,
                        ChangeDate = ckM_Label1.Text
                    };
                    bool ret = mbl.M_Vendor_SelectTop1(mse);
                    if (ret)
                    {
                        ScMaker.LabelText = mse.VendorName;
                    }
                    else
                    {
                        //E136
                        mbl.ShowMessage("E136");
                        ScMaker.LabelText = "";
                        return(false);
                    }
                }
                break;

            case (int)EIndex.BrandName:

                break;
            }

            return(true);
        }
Esempio n. 22
0
        public DataTable M_Vendor_SelectTop1(M_Vendor_Entity mve)
        {
            string sp = "M_Vendor_SelectTop1";
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.ChangeDate
                  } },
                { "@VendorFlg", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorFlg
                  } },
                //{ "@PayeeFlg", new ValuePair { value1 = SqlDbType.VarChar, value2 = mve.PayeeFlg } },
                //{ "@MoneyPayeeFlg", new ValuePair { value1 = SqlDbType.VarChar, value2 = mve.MoneyPayeeFlg } },
            };

            return(SelectData(dic, sp));
        }
Esempio n. 23
0
        public DataTable M_SearchVendor(M_Vendor_Entity mve)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mve.ChangeDate
                  } },
                { "@VendorKBN", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mve.VendorKBN
                  } },
                { "@VendorName", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorName
                  } },
                { "@VendorKana", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorKana
                  } },
                { "@VendorCDFrom", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCDFrom
                  } },
                { "@VendorCDTo", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.VendorCDTo
                  } },
                { "@NotDisplayNote", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.NotDisplyNote
                  } },
                { "@keyword1", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.Keyword1
                  } },
                { "@keyword2", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.Keyword2
                  } },
                { "@keyword3", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mve.Keyword3
                  } }
            };

            UseTransaction = true;
            return(SelectData(dic, "M_SearchVendor"));
        }
Esempio n. 24
0
 public DataTable M_Vendor_Select(M_Vendor_Entity mve)
 {
     return(mvdl.M_Vendor_SelectForSiharaiNyuuroku(mve));
 }
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.OrderDateFrom:
            case (int)EIndex.OrderDateTo:
            case (int)EIndex.ArrivalPlanDateFrom:
            case (int)EIndex.ArrivalPlanDateTo:
            case (int)EIndex.ArrivalPlanMonthFrom:
            case (int)EIndex.ArrivalPlanMonthTo:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                string strYmd = "";
                switch (index)
                {
                case (int)EIndex.ArrivalPlanMonthFrom:
                case (int)EIndex.ArrivalPlanMonthTo:
                    strYmd = bbl.FormatDate(detailControls[index].Text + "/01");

                    break;

                default:
                    strYmd = bbl.FormatDate(detailControls[index].Text);
                    break;
                }

                //日付として正しいこと(Be on the correct date)E103
                //if (!bbl.CheckDate(strYmd))
                //{
                //    //E103
                //    bbl.ShowMessage("E103");
                //    return false;
                //}

                //switch (index)
                //{
                //    case (int)EIndex.ArrivalPlanMonthFrom:
                //    case (int)EIndex.ArrivalPlanMonthTo:
                //        detailControls[index].Text = strYmd.Substring(0, 7);
                //        break;
                //    default:
                //        detailControls[index].Text = strYmd;
                //        break;
                //}

                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.OrderDateTo || index == (int)EIndex.ArrivalPlanDateTo || index == (int)EIndex.ArrivalPlanMonthTo)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            bbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }
                //発注日のどちらかに入力があった場合に、未確定分、完売、不要のチェックボックスの入力を可能にする
                if (!string.IsNullOrWhiteSpace(detailControls[(int)EIndex.OrderDateFrom].Text) || !string.IsNullOrWhiteSpace(detailControls[(int)EIndex.OrderDateTo].Text))
                {
                    ChkMikakutei.Enabled = true;
                    ChkKanbai.Enabled    = true;
                    ChkFuyo.Enabled      = true;
                }

                break;

            case (int)EIndex.OrderCD:
                //入力無くても良い(It is not necessary to input)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    //情報ALLクリア
                    ClearCustomerInfo();
                    return(true);
                }

                //[M_Vendor_Select]
                M_Vendor_Entity mve = new M_Vendor_Entity
                {
                    VendorCD   = detailControls[index].Text,
                    VendorFlg  = "1",
                    ChangeDate = bbl.GetDate()
                };
                Vendor_BL sbl = new Vendor_BL();
                ret = sbl.M_Vendor_SelectTop1(mve);

                if (ret)
                {
                    if (mve.DeleteFlg == "1")
                    {
                        bbl.ShowMessage("E119");
                        //顧客情報ALLクリア
                        ClearCustomerInfo();
                        return(false);
                    }
                    ScOrderCD.LabelText = mve.VendorName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(false);
                }

                break;

            case (int)EIndex.StoreCD:
                //選択必須(Entry required)
                if (!RequireCheck(new Control[] { detailControls[index] }))
                {
                    return(false);
                }
                else
                {
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }

                break;
            }

            return(true);
        }
Esempio n. 26
0
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            if (detailControls[index].GetType().Equals(typeof(CKM_Controls.CKM_TextBox)))
            {
                if (((CKM_Controls.CKM_TextBox)detailControls[index]).isMaxLengthErr)
                {
                    return(false);
                }
            }

            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.ArrivalPlanDateFrom:
            case (int)EIndex.ArrivalPlanDateTo:
            case (int)EIndex.ArrivalDateFrom:
            case (int)EIndex.ArrivalDateTo:
            case (int)EIndex.PurchaseDateFrom:
            case (int)EIndex.PurchaseDateTo:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = bbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!bbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    bbl.ShowMessage("E103");
                    return(false);
                }
                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.ArrivalPlanDateTo || index == (int)EIndex.ArrivalDateTo || index == (int)EIndex.PurchaseDateTo)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            bbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedIndex == -1)
                {
                    bbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                else
                {
                    //店舗権限のチェック
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }
                break;

            case (int)EIndex.VendorCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScVendor.LabelText = "";
                    return(true);
                }

                //string ymd = detailControls[(int)EIndex.]
                //[M_VendorCD_Select]
                M_Vendor_Entity mce = new M_Vendor_Entity
                {
                    VendorCD   = detailControls[index].Text,
                    VendorFlg  = "1",
                    ChangeDate = bbl.GetDate()
                };
                Vendor_BL sbl = new Vendor_BL();
                bool      ret = sbl.M_Vendor_SelectTop1(mce);
                if (ret)
                {
                    ScVendor.LabelText = mce.VendorName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScVendor.LabelText = "";
                    return(false);
                }

                break;
            }

            return(true);
        }
        private bool CheckDetail(int index)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.VendorCd:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScMaker.LabelText = "";
                    return(true);
                }
                else
                {
                    M_Vendor_Entity mve = new M_Vendor_Entity
                    {
                        VendorCD   = detailControls[index].Text,
                        ChangeDate = string.IsNullOrWhiteSpace(this.ChangeDate) ? sbl.GetDate() : this.ChangeDate,
                        DeleteFlg  = "0"
                    };
                    Vendor_BL vbl = new Vendor_BL();
                    ret = vbl.M_Vendor_SelectTop1(mve);
                    if (ret)
                    {
                        ScMaker.LabelText = mve.VendorName;
                    }
                    else
                    {
                        sbl.ShowMessage("E101");
                        ScMaker.LabelText = "";
                        return(false);
                    }
                }
                break;

            case (int)EIndex.BrandCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScBrand.LabelText = "";
                }
                else
                {
                    //[M_Brand]
                    M_Brand_Entity mme = new M_Brand_Entity
                    {
                        //ChangeDate = string.IsNullOrWhiteSpace(this.ChangeDate) ? sbl.GetDate() : this.ChangeDate,
                        BrandCD = detailControls[index].Text
                    };
                    Brand_BL bbl = new Brand_BL();
                    ret = bbl.M_Brand_Select(mme);
                    if (ret)
                    {
                        ScBrand.LabelText = mme.BrandName;
                    }
                    else
                    {
                        //E101
                        sbl.ShowMessage("E101");
                        ScBrand.LabelText = "";
                        return(false);
                    }
                }
                break;

            case (int)EIndex.SportsCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScSports.LabelText = "";
                }
                else
                {
                    //以下の条件でM_MultiPorposeが存在しない場合、エラー

                    //[M_MultiPorpose]
                    M_MultiPorpose_Entity mme = new M_MultiPorpose_Entity
                    {
                        ID         = MultiPorpose_BL.ID_SPORTS,
                        Key        = detailControls[index].Text,
                        ChangeDate = string.IsNullOrWhiteSpace(this.ChangeDate) ? sbl.GetDate() : this.ChangeDate
                    };
                    MultiPorpose_BL mbl = new MultiPorpose_BL();
                    DataTable       dt  = mbl.M_MultiPorpose_Select(mme);
                    if (dt.Rows.Count > 0)
                    {
                        ScSports.LabelText = dt.Rows[0]["Char1"].ToString();
                    }
                    else
                    {
                        //E101
                        sbl.ShowMessage("E101");
                        ScSports.LabelText = "";
                        return(false);
                    }
                }
                break;

            //case (int)EIndex.ClassificationA:
            //    if (string.IsNullOrWhiteSpace(detailControls[index].Text))
            //    {
            //        scClassificationA.LabelText = "";
            //    }
            //    else
            //    {
            //        //以下の条件でM_ClassificationAが存在しない場合、エラー

            //        //[M_ClassificationA]
            //        M_Classification_Entity mce = new M_Classification_Entity
            //        {
            //            ClassificationA = detailControls[index].Text
            //        };
            //        Classification_BL mbl = new Classification_BL();
            //        ret = mbl.M_ClassificationA_Select(mce);
            //        if (ret)
            //        {
            //            scClassificationA.LabelText = mce.ClassificationAName;
            //        }
            //        else
            //        {
            //            //E101
            //            sbl.ShowMessage("E101");
            //            scClassificationA.LabelText = "";
            //            return false;
            //        }
            //    }
            //    break;
            //case (int)EIndex.ClassificationB:
            //    if (string.IsNullOrWhiteSpace(detailControls[index].Text))
            //    {
            //        scClassificationB.LabelText = "";
            //    }
            //    else
            //    {
            //        //以下の条件でM_ClassificationBが存在しない場合、エラー

            //        //[M_ClassificationB]
            //        M_Classification_Entity mce = new M_Classification_Entity
            //        {
            //            ClassificationA = detailControls[index - 1].Text,
            //            ClassificationB = detailControls[index].Text
            //        };
            //        Classification_BL mbl = new Classification_BL();
            //        ret = mbl.M_ClassificationB_Select(mce);
            //        if (ret)
            //        {
            //            scClassificationA.LabelText = mce.ClassificationAName;
            //            scClassificationB.LabelText = mce.ClassificationBName;
            //        }
            //        else
            //        {
            //            //E101
            //            sbl.ShowMessage("E101");
            //            scClassificationB.LabelText = "";
            //            return false;
            //        }
            //    }
            //    break;

            //case (int)EIndex.ClassificationC:
            //    if (string.IsNullOrWhiteSpace(detailControls[index].Text))
            //    {
            //        scClassificationC.LabelText = "";
            //    }
            //    else
            //    {
            //        //以下の条件でM_ClassificationCが存在しない場合、エラー

            //        //[M_ClassificationC]
            //        M_Classification_Entity mce = new M_Classification_Entity
            //        {
            //            ClassificationA = detailControls[index - 2].Text,
            //            ClassificationB = detailControls[index - 1].Text,
            //            ClassificationC = detailControls[index].Text
            //        };
            //        Classification_BL mbl = new Classification_BL();
            //        ret = mbl.M_ClassificationC_Select(mce);
            //        if (ret)
            //        {
            //            scClassificationA.LabelText = mce.ClassificationAName;
            //            scClassificationB.LabelText = mce.ClassificationBName;
            //            scClassificationC.LabelText = mce.ClassificationCName;
            //        }
            //        else
            //        {
            //            //E101
            //            sbl.ShowMessage("E101");
            //            scClassificationC.LabelText = "";
            //            return false;
            //        }
            //    }
            //    break;
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.InputStart:
            case (int)EIndex.InputEnd:
            case (int)EIndex.UpdateStart:
            case (int)EIndex.UpdateEnd:

                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = this.sbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!this.sbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    this.sbl.ShowMessage("E103");
                    return(false);
                }
                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.InputEnd || index == (int)EIndex.UpdateEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            this.sbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;
            }

            return(true);
        }
        private bool CheckDetail(int index)
        {
            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = snbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!snbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    snbl.ShowMessage("E103");
                    return(false);
                }
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.DayEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            snbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                    ScCustomer.ChangeDate = detailControls[index].Text;
                }

                break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedValue.Equals("-1"))
                {
                    snbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                else
                {
                    //店舗権限のチェック、引数で処理可能店舗の配列をセットしたい
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        snbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }
                break;

            case (int)EIndex.StaffCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScStaff.LabelText = "";
                    return(true);
                }

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = detailControls[index].Text,
                    ChangeDate = snbl.GetDate()     // detailControls[(int)EIndex.MitsumoriDate].Text
                };
                Staff_BL bl  = new Staff_BL();
                bool     ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    ScStaff.LabelText = mse.StaffName;
                }
                else
                {
                    snbl.ShowMessage("E101");
                    ScStaff.LabelText = "";
                    return(false);
                }
                break;

            case (int)EIndex.VendorCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScCustomer.LabelText = "";
                    return(true);
                }

                //[M_VendorCD_Select]
                M_Vendor_Entity mce = new M_Vendor_Entity
                {
                    VendorCD   = detailControls[index].Text,
                    ChangeDate = snbl.GetDate()
                };
                Vendor_BL sbl = new Vendor_BL();
                ret = sbl.M_Vendor_SelectTop1(mce);
                if (ret)
                {
                    ScCustomer.LabelText = mce.VendorName;
                }
                else
                {
                    snbl.ShowMessage("E101");
                    ScCustomer.LabelText = "";
                    return(false);
                }

                break;
            }

            return(true);
        }
Esempio n. 29
0
 public DataTable M_Vendor_ZipCodeSelect(M_Vendor_Entity mve)
 {
     return(mvdl.M_Vendor_ZipCodeSelect(mve));
 }
Esempio n. 30
0
 public bool M_Vendor_Delete(M_Vendor_Entity mve)
 {
     return(mvdl.M_Vendor_Delete(mve));
 }