Exemplo n.º 1
0
        /// <summary>
        /// 月次債権計算処理
        /// GetsujiSaikenKeisanSyoriより更新時に使用
        /// </summary>
        /// <param name="de"></param>
        /// <returns></returns>
        public bool D_MonthlyClaims_Exec(D_MonthlyClaims_Entity de)
        {
            string sp = "PRC_GetsujiSaikenKeisanSyori";
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@FiscalYYYYMM", new ValuePair {
                      value1 = SqlDbType.Int, value2 = de.YYYYMM
                  } },
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = de.StoreCD
                  } },
                { "@Mode", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = de.Mode.ToString()
                  } },
                { "@Operator", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = de.Operator
                  } },
                { "@PC", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = de.PC
                  } },
            };

            UseTransaction = true;
            return(InsertUpdateDeleteData(dic, sp));
        }
Exemplo n.º 2
0
        public DataTable D_MonthlyClaims_Select(D_MonthlyClaims_Entity dmce)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>()
            {
                { "@TargetDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = dmce.TargetDate
                  } },
                { "@CustomerCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dmce.CustomerCD
                  } },
                //{"@RdoBill",new ValuePair{value1=SqlDbType.TinyInt,value2=dmce.BillType} },
                //{"@RdoSale",new ValuePair{value1=SqlDbType.TinyInt,value2=dmce.SaleType} },
                { "@Chkdo", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dmce.chk_do
                  } },
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dmce.StoreCD
                  } },
                { "@PrintType", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dmce.PrintType
                  } }
            };

            return(SelectData(dic, "D_MonthlyClaims_SelectALL"));
        }
 public void ExecUpdate(D_MonthlyClaims_Entity de)
 {
     try {
         sbl.GetsujiSaikenKeisanSyori(de);
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
     }
 }
Exemplo n.º 4
0
 private D_MonthlyClaims_Entity GetDataInfo()
 {
     dmc_e = new D_MonthlyClaims_Entity()
     {
         TargetDate = skh_bl.GetDate(txtTargetdate.Text),
         CustomerCD = sc_Customer.TxtCode.Text,
         PrintType  = rdo_BillAddress.Checked ? "1" : "2",
         StoreCD    = cbo_Store.SelectedValue.ToString(),
         chk_do     = chk_Check.Checked ? "1" : "0",
         YYYYMM     = txtTargetdate.Text.Replace("/", "")
     };
     return(dmc_e);
 }
Exemplo n.º 5
0
        private void M_StoreCheck()
        {
            dmc_e     = GetDataInfo();
            dtS_check = new DataTable();

            dtS_check = skh_bl.M_StoreCheck_Select(dmc_e, 1);//M_StoreClose_(StoreCD)Datacheck
            if (dtS_check.Rows.Count > 0)
            {
                string ProgramID = "GetsujiSaikenKeisanSyori";

                //残す部分
                //NoFilePathcase
                OpenForm(ProgramID, dmc_e.YYYYMM);
                //月次処理(債権集計処理)を起動する
            }
        }
Exemplo n.º 6
0
        public DataTable M_StoreCheck_Select(D_MonthlyClaims_Entity dmce, int mode)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>()
            {
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dmce.StoreCD
                  } },
                { "@YYYYMM", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dmce.YYYYMM
                  } },
                { "@Mode", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mode.ToString()
                  } }
            };

            return(SelectData(dic, "M_StoreClose_Check"));
        }
Exemplo n.º 7
0
        private DataTable CheckData()
        {
            DataTable dt = null;

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

            return(dt);
        }
        /// <summary>
        /// 月次債権計算処理
        /// </summary>
        /// <param name="de"></param>
        /// <returns></returns>
        public bool GetsujiSaikenKeisanSyori(D_MonthlyClaims_Entity de)
        {
            D_MonthlyClaims_DL dl = new D_MonthlyClaims_DL();

            return(dl.D_MonthlyClaims_Exec(de));
        }
Exemplo n.º 9
0
 public DataTable D_MonthlyClaims_Select(D_MonthlyClaims_Entity dmce)
 {
     return(mdc_dl.D_MonthlyClaims_Select(dmce));
 }
Exemplo n.º 10
0
 public DataTable M_StoreCheck_Select(D_MonthlyClaims_Entity dmce, int mode)
 {
     return(mdc_dl.M_StoreCheck_Select(dmce, mode));
 }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            Console.Title = "GetsujiSaikenKeisanSyori";

            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&	ClosePosition1=0&	ClosePosition3=0なら
                    if (gsbl.Z_Set(me.FiscalYYYYMM) <= gsbl.Z_Set(InFiscalYYYYMM))
                    {
                        if (gsbl.Z_Set(me.FiscalYYYYMM) == gsbl.Z_Set(InFiscalYYYYMM))
                        {
                            if (me.ClosePosition1.Equals("0") && me.ClosePosition3.Equals("0"))
                            {
                                execFlg = true;
                            }
                        }
                        else
                        {
                            execFlg = true;
                        }
                        InFiscalYYYYMM = me.FiscalYYYYMM;
                    }
                }

                if (execFlg)
                {
                    //【データ更新】
                    D_MonthlyClaims_Entity de = new D_MonthlyClaims_Entity
                    {
                        PC       = Login_BL.GetHostName(),
                        Operator = InOperatorCD,
                        YYYYMM   = InFiscalYYYYMM,
                        StoreCD  = InStoreCD,
                        Mode     = Mode
                    };

                    api.ExecUpdate(de);
                }
            }
        }