/// <summary>
        /// 入金予定表データ取得処理
        /// </summary>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private DataTable CheckData()
        {
            for (int i = 0; i < detailControls.Length; i++)
            {
                if (CheckDetail(i, false) == false)
                {
                    detailControls[i].Focus();
                    return(null);
                }
            }

            dse = GetSearchInfo();

            M_Customer_Entity mce = new M_Customer_Entity
            {
                //StaffCD = ScStaff.TxtCode.Text
                CustomerCD = ScCustomer.TxtCode.Text
            };

            DataTable dt = mibl.D_CollectPlan_SelectForPrint(dse, mce);

            //以下の条件でデータが存在しなければエラー (Error if record does not exist)E133
            if (dt.Rows.Count == 0)
            {
                bbl.ShowMessage("E133");
                previousCtrl.Focus();
                return(null);
            }

            return(dt);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 画面情報をセット
        /// </summary>
        /// <returns></returns>
        private D_CollectPlan_Entity GetEntity()
        {
            doe         = new D_CollectPlan_Entity();
            doe.StoreCD = CboStoreCD.SelectedValue.ToString();

            doe.DateFrom = detailControls[(int)EIndex.ShippingDateFrom].Text;
            doe.DateTo   = detailControls[(int)EIndex.ShippingDateTo].Text;
            doe.Kbn      = 1;

            if (ckM_CheckBox1.Checked)
            {
                if (!ckM_CheckBox2.Checked)
                {
                    doe.Kbn = 2;
                }
            }

            if (ckM_CheckBox2.Checked)
            {
                if (!ckM_CheckBox1.Checked)
                {
                    doe.Kbn = 3;
                }
            }

            doe.PaymentMethodCD = CboPaymentMethodCD.SelectedValue.ToString();

            return(doe);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 請求締処理よりチェック処理時に使用
        /// </summary>
        /// <param name="dce"></param>
        /// <returns></returns>
        public DataTable D_CollectPlan_Check(D_CollectPlan_Entity dce)
        {
            string sp = "D_CollectPlan_Check";

            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@Syori", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dce.Syori
                  } },
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.StoreCD
                  } },
                { "@CustomerCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.CustomerCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.BillingDate
                  } },
                { "@BillingCloseDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.BillingCloseDate
                  } }
            };

            return(SelectData(dic, sp));
        }
Exemplo n.º 4
0
        protected override void ExecDisp()
        {
            for (int i = 0; i < detailControls.Length; i++)
            {
                if (CheckDetail(i) == false)
                {
                    detailControls[i].Focus();
                    return;
                }
            }

            //更新処理
            doe = GetEntity();
            DataTable dt = mibl.D_CollectPlan_SelectAllForSyokai(doe);

            GvDetail.DataSource = dt;

            if (dt.Rows.Count > 0)
            {
                GvDetail.SelectionMode       = DataGridViewSelectionMode.RowHeaderSelect;
                GvDetail.CurrentRow.Selected = true;
                GvDetail.Enabled             = true;
                GvDetail.Focus();
            }
            else
            {
                bbl.ShowMessage("E128");
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 未入金確認照会にて使用
        /// </summary>
        /// <param name="doe"></param>
        /// <returns></returns>
        public DataTable D_CollectPlan_SelectAllForSyokai(D_CollectPlan_Entity doe)
        {
            string sp = "D_CollectPlan_SelectAllForSyokai";

            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@ShippingDateFrom", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = doe.DateFrom
                  } },
                { "@ShippingDateTo", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = doe.DateTo
                  } },
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = doe.StoreCD
                  } },
                { "@PaymentMethodCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = doe.PaymentMethodCD
                  } },
                { "@Kbn", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = doe.Kbn.ToString()
                  } },
            };

            return(SelectData(dic, sp));
        }
Exemplo n.º 6
0
        /// <summary>
        /// 請求締処理
        /// SeikyuuShimeShoriより更新時に使用
        /// </summary>
        /// <param name = "dse" ></ param >
        /// < param name="operationMode"></param>
        /// <param name = "operatorNm" ></ param >
        /// < param name="pc"></param>
        /// <returns></returns>
        public bool D_BillingProcessing_Exec(D_CollectPlan_Entity dce, string operatorNm, string pc)
        {
            string sp = "PRC_SeikyuuShimeShori";

            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@Syori", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dce.Syori
                  } },
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.StoreCD
                  } },
                { "@CustomerCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.CustomerCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.BillingDate
                  } },
                { "@BillingCloseDate", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dce.BillingCloseDate
                  } },
                { "@Operator", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = operatorNm
                  } },
                { "@PC", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = pc
                  } },
            };

            UseTransaction = true;
            return(InsertUpdateDeleteData(dic, sp));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 未入金確認照会にて使用
        /// </summary>
        /// <param name="doe"></param>
        /// <returns></returns>
        public DataTable D_CollectPlan_SelectAllForSyosai(D_CollectPlan_Entity doe)
        {
            string sp = "D_CollectPlan_SelectAllForSyosai";

            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@CollectPlanNO", new ValuePair {
                      value1 = SqlDbType.Int, value2 = doe.CollectPlanNO
                  } },
            };

            return(SelectData(dic, sp));
        }
        private D_CollectPlan_Entity GetSearchInfo()
        {
            dse = new D_CollectPlan_Entity
            {
                DateFrom   = detailControls[(int)EIndex.DayStart].Text,
                DateTo     = detailControls[(int)EIndex.DayEnd].Text,
                CustomerCD = ScCustomer.TxtCode.Text,
                //CustomerName = detailControls[(int)EIndex.CustomerName].Text,
                StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(),
            };

            if (ckM_RadioButton1.Checked)
            {
            }
            else if (ckM_RadioButton2.Checked)
            {
                //請求締済
                dse.PrintFLG = "1";
            }
            else
            {
                //未印刷
                dse.PrintFLG = "0";
            }
            if (ckM_CheckBox1.Checked)
            {
                dse.PaymentProgressKBN = "1";
            }
            else
            {
                dse.PaymentProgressKBN = "0";
            }

            //商品明細印字(ドリルダウン非表示設定で使用)
            if (ckM_CheckBox2.Checked)
            {
                dse.DetailOn = "1";
            }
            else
            {
                dse.DetailOn = "0";
            }

            return(dse);
        }
Exemplo n.º 9
0
        protected override void ExecSec()
        {
            for (int i = 0; i < detailControls.Length; i++)
            {
                if (CheckDetail(i, false) == false)
                {
                    detailControls[i].Focus();
                    return;
                }
            }

            bool ret;
            int  syori = Convert.ToInt16(cboSyori.SelectedValue);

            switch (syori)
            {
            //処理:請求締の場合
            case 1:
                if (bbl.ShowMessage("Q101") != DialogResult.Yes)
                {
                    return;
                }
                break;

            case 2:
                if (bbl.ShowMessage("Q103") != DialogResult.Yes)
                {
                    return;
                }

                break;

            case 3:
                if (bbl.ShowMessage("Q104") != DialogResult.Yes)
                {
                    return;
                }

                break;
            }

            D_CollectPlan_Entity dce = new D_CollectPlan_Entity
            {
                Syori            = syori.ToString(),
                StoreCD          = CboStoreCD.SelectedValue.ToString(),
                CustomerCD       = detailControls[(int)EIndex.CustomerCD].Text,
                BillingDate      = detailControls[(int)EIndex.SeqSDT].Text,
                BillingCloseDate = detailControls[(int)EIndex.Simbi].Text
            };

            ret = ssbl.D_CollectPlan_Check(dce);
            if (!ret)
            {
                bbl.ShowMessage(dce.MessageID);
                return;
            }

            //更新処理
            ssbl.D_BillingProcessing_Exec(dce, InOperatorCD, InPcID);

            ExecDisp();

            detailControls[(int)EIndex.Syori].Focus();
        }
Exemplo n.º 10
0
 /// <summary>
 /// 未入金確認照会にて使用
 /// </summary>
 /// <param name="de"></param>
 /// <returns></returns>
 public DataTable D_CollectPlan_SelectAllForSyosai(D_CollectPlan_Entity de)
 {
     return(mdl.D_CollectPlan_SelectAllForSyosai(de));
 }
Exemplo n.º 11
0
        /// <summary>
        /// 入金予定表よりデータ抽出時に使用
        /// </summary>
        /// <param name="dce"></param>
        /// <returns></returns>
        public DataTable D_CollectPlan_SelectForPrint(D_CollectPlan_Entity dce, M_Customer_Entity mce)
        {
            string sp = "D_CollectPlan_SelectForPrint";

            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@DateFrom", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.DateFrom
                  } },
                { "@DateTo", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.DateTo
                  } },
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.StoreCD
                  } },
                { "@StaffCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mce.StaffCD
                  } },
                { "@CustomerCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dce.CustomerCD
                  } },
                { "@PrintFLG", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dce.PrintFLG
                  } },
                { "@PaymentProgressKBN", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dce.PaymentProgressKBN
                  } },
                { "@DetailOn", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dce.DetailOn
                  } },
            };

            if (dce.PrintFLG == "1")
            {
                DataTable dt1    = SelectData(dic, sp);
                DataRow[] drs1   = dt1.Select(" BillingNO IS NOT NULL");
                DataTable newdt1 = dt1.Clone();

                foreach (var dr in drs1)
                {
                    //消込済分印刷=OFFの場合 PaymentProgressKBN<=1
                    if (dce.PaymentProgressKBN == "0")
                    {
                        if (Convert.ToInt16(dr["PaymentProgressKBN"]) > 1)
                        {
                            continue;
                        }
                    }

                    //newdt.Rows.Add(dr)ではダメ。
                    //drはdtに所属している行なので、別のDataTableであるnewdtにはAddできない。
                    //よって、newdtの新しい行を作成し、その各列の値をdrと全く同じにし、それをnewdtに追加すれば良い。
                    DataRow newrow1 = newdt1.NewRow();
                    newrow1.ItemArray = dr.ItemArray;
                    newdt1.Rows.Add(newrow1);
                }
                return(newdt1);
            }
            else
            {
                //消込済分印刷=OFFの場合 PaymentProgressKBN<=1
                if (dce.PaymentProgressKBN == "0")
                {
                    DataTable dt1    = SelectData(dic, sp);
                    DataRow[] drs1   = dt1.Select(" PaymentProgressKBN <= 1");
                    DataTable newdt1 = dt1.Clone();

                    foreach (var dr in drs1)
                    {
                        //newdt.Rows.Add(dr)ではダメ。
                        //drはdtに所属している行なので、別のDataTableであるnewdtにはAddできない。
                        //よって、newdtの新しい行を作成し、その各列の値をdrと全く同じにし、それをnewdtに追加すれば良い。
                        DataRow newrow1 = newdt1.NewRow();
                        newrow1.ItemArray = dr.ItemArray;
                        newdt1.Rows.Add(newrow1);
                    }
                    return(newdt1);
                }
                else
                {
                    return(SelectData(dic, sp));
                }
            }
        }
 public DataTable D_CollectPlan_SelectForPrint(D_CollectPlan_Entity dce, M_Customer_Entity mce)
 {
     return(mdl.D_CollectPlan_SelectForPrint(dce, mce));
 }