示例#1
0
 private void Save(string type)
 {
     if (ErrorCheck(type))
     {
         pointSettei_bl = new TempoRejiPointSettei_BL();
         if (pointSettei_bl.ShowMessage("Q101") == DialogResult.Yes)
         {
             mspe = GetStorePointEntity();
             if (pointSettei_bl.M_StorePoint_Insert_Update(mspe))
             {
                 pointSettei_bl.ShowMessage("I101");
                 BindData();
             }
             else
             {
                 pointSettei_bl.ShowMessage("S001");
             }
         }
     }
 }
        public DataTable M_StorePoint_Select(M_StorePoint_Entity mspe)
        {
            string sp = "M_StorePoint_Select";
            //KTP 2019-0529 全部のFunctionでをしなくてもいいように共通のFunctionでやり方を更新しました。
            //command = new SqlCommand(sp, GetConnection());
            //command.CommandType = CommandType.StoredProcedure;
            //command.CommandTimeout = 0;

            //command.Parameters.Add("@KouzaCD", SqlDbType.VarChar).Value = mke.KouzaCD;
            //command.Parameters.Add("@ChangeDate", SqlDbType.VarChar).Value = mke.ChangeDate;
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.StoreCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.ChangeDate
                  } },
            };

            //return SelectData(sp);
            return(SelectData(dic, sp));
        }
示例#3
0
        public M_StorePoint_Entity M_StorePoint_Select(M_StorePoint_Entity mspe)
        {
            DataTable dtStorePoint = mspdl.M_StorePoint_Select(mspe);

            if (dtStorePoint.Rows.Count > 0)
            {
                mspe.ChangeDate     = dtStorePoint.Rows[0]["ChangeDate"].ToString();
                mspe.PointRate      = dtStorePoint.Rows[0]["PointRate"].ToString();
                mspe.ServicedayRate = dtStorePoint.Rows[0]["ServicedayRate"].ToString();
                mspe.ExpirationDate = dtStorePoint.Rows[0]["ExpirationDate"].ToString();
                mspe.MaxPoint       = dtStorePoint.Rows[0]["MaxPoint"].ToString();
                mspe.TicketUnit     = dtStorePoint.Rows[0]["TicketUnit"].ToString();

                mspe.Print1 = dtStorePoint.Rows[0]["Print1"].ToString();
                mspe.Bold1  = dtStorePoint.Rows[0]["Bold1"].ToString();
                mspe.Size1  = dtStorePoint.Rows[0]["Size1"].ToString();

                mspe.Print2 = dtStorePoint.Rows[0]["Print2"].ToString();
                mspe.Bold2  = dtStorePoint.Rows[0]["Bold2"].ToString();
                mspe.Size2  = dtStorePoint.Rows[0]["Size2"].ToString();

                mspe.Print3 = dtStorePoint.Rows[0]["Print3"].ToString();
                mspe.Bold3  = dtStorePoint.Rows[0]["Bold3"].ToString();
                mspe.Size3  = dtStorePoint.Rows[0]["Size3"].ToString();

                mspe.Print4 = dtStorePoint.Rows[0]["Print4"].ToString();
                mspe.Bold4  = dtStorePoint.Rows[0]["Bold4"].ToString();
                mspe.Size4  = dtStorePoint.Rows[0]["Size4"].ToString();

                mspe.Print5 = dtStorePoint.Rows[0]["Print5"].ToString();
                mspe.Bold5  = dtStorePoint.Rows[0]["Bold5"].ToString();
                mspe.Size5  = dtStorePoint.Rows[0]["Size5"].ToString();

                mspe.Print6 = dtStorePoint.Rows[0]["Print6"].ToString();
                mspe.Bold6  = dtStorePoint.Rows[0]["Bold6"].ToString();
                mspe.Size6  = dtStorePoint.Rows[0]["Size6"].ToString();

                mspe.Print7 = dtStorePoint.Rows[0]["Print7"].ToString();
                mspe.Bold7  = dtStorePoint.Rows[0]["Bold7"].ToString();
                mspe.Size7  = dtStorePoint.Rows[0]["Size7"].ToString();

                mspe.Print8 = dtStorePoint.Rows[0]["Print8"].ToString();
                mspe.Bold8  = dtStorePoint.Rows[0]["Bold8"].ToString();
                mspe.Size8  = dtStorePoint.Rows[0]["Size8"].ToString();

                mspe.Print9 = dtStorePoint.Rows[0]["Print9"].ToString();
                mspe.Bold9  = dtStorePoint.Rows[0]["Bold9"].ToString();
                mspe.Size9  = dtStorePoint.Rows[0]["Size9"].ToString();

                mspe.Print10 = dtStorePoint.Rows[0]["Print10"].ToString();
                mspe.Bold10  = dtStorePoint.Rows[0]["Bold10"].ToString();
                mspe.Size10  = dtStorePoint.Rows[0]["Size10"].ToString();

                mspe.Print11 = dtStorePoint.Rows[0]["Print11"].ToString();
                mspe.Bold11  = dtStorePoint.Rows[0]["Bold11"].ToString();
                mspe.Size11  = dtStorePoint.Rows[0]["Size11"].ToString();

                mspe.Print12 = dtStorePoint.Rows[0]["Print12"].ToString();
                mspe.Bold12  = dtStorePoint.Rows[0]["Bold12"].ToString();
                mspe.Size12  = dtStorePoint.Rows[0]["Size12"].ToString();

                mspe.DeleteFlg = dtStorePoint.Rows[0]["DeleteFlg"].ToString();
                return(mspe);
            }
            return(null);
        }
示例#4
0
 public bool M_StorePoint_Insert_Update(M_StorePoint_Entity mspe)
 {
     return(mspdl.M_StorePoint_Insert_Update(mspe));
 }
示例#5
0
        public M_StorePoint_Entity GetStorePointEntity()
        {
            mspe = new M_StorePoint_Entity
            {
                StoreCD        = StoreCD,
                ChangeDate     = txtChangeDate.Text.Replace("/", "-"),
                PointRate      = txtPointRate.Text,
                ServicedayRate = txtServiceDayRate.Text,
                ExpirationDate = txtExperationDate.Text,
                MaxPoint       = txtMaxPoint.Text,
                TicketUnit     = txtTicketUnit.Text,

                Print1 = txtPrint1.Text,
                Size1  = string.IsNullOrWhiteSpace(txtSize1.Text)? "0" : txtSize1.Text,
                Bold1  = chk1.Checked ? "1" : "0",

                Print2 = txtPrint2.Text,
                Size2  = string.IsNullOrWhiteSpace(txtSize2.Text) ? "0" : txtSize2.Text,
                Bold2  = chk2.Checked ? "1" : "0",

                Print3 = txtPrint3.Text,
                Size3  = string.IsNullOrWhiteSpace(txtSize3.Text) ? "0" : txtSize3.Text,
                Bold3  = chk3.Checked ? "1" : "0",

                Print4 = txtPrint4.Text,
                Size4  = string.IsNullOrWhiteSpace(txtSize4.Text) ? "0" : txtSize4.Text,
                Bold4  = chk4.Checked ? "1" : "0",

                Print5 = txtPrint5.Text,
                Size5  = string.IsNullOrWhiteSpace(txtSize5.Text) ? "0" : txtSize5.Text,
                Bold5  = chk5.Checked ? "1" : "0",

                Print6 = txtPrint6.Text,
                Size6  = string.IsNullOrWhiteSpace(txtSize6.Text) ? "0" : txtSize6.Text,
                Bold6  = chk6.Checked ? "1" : "0",

                Print7 = txtPrint7.Text,
                Size7  = string.IsNullOrWhiteSpace(txtSize7.Text) ? "0" : txtSize7.Text,
                Bold7  = chk7.Checked ? "1" : "0",

                Print8 = txtPrint8.Text,
                Size8  = string.IsNullOrWhiteSpace(txtSize8.Text) ? "0" : txtSize8.Text,
                Bold8  = chk8.Checked ? "1" : "0",

                Print9 = txtPrint9.Text,
                Size9  = string.IsNullOrWhiteSpace(txtSize9.Text) ? "0" : txtSize9.Text,
                Bold9  = chk9.Checked ? "1" : "0",

                Print10 = txtPrint10.Text,
                Size10  = string.IsNullOrWhiteSpace(txtSize10.Text) ? "0" : txtSize10.Text,
                Bold10  = chk10.Checked ? "1" : "0",

                Print11 = txtPrint11.Text,
                Size11  = string.IsNullOrWhiteSpace(txtSize11.Text) ? "0" : txtSize11.Text,
                Bold11  = chk11.Checked ? "1" : "0",

                Print12        = txtPrint12.Text,
                Size12         = string.IsNullOrWhiteSpace(txtSize12.Text) ? "0" : txtSize12.Text,
                Bold12         = chk12.Checked ? "1" : "0",
                DeleteFlg      = "0",
                ProcessMode    = "登録",
                InsertOperator = InOperatorCD,
                ProgramID      = InProgramID,
                Key            = StoreCD.ToString() + " " + ChangeDate.ToString(),
                PC             = InPcID,
            };
            return(mspe);
        }
示例#6
0
        private void DisplayData(string StoreCD, string type)
        {
            pointSettei_bl = new TempoRejiPointSettei_BL();
            if (ErrorCheck(type))
            {
                mspe = new M_StorePoint_Entity
                {
                    StoreCD    = StoreCD,
                    ChangeDate = txtChangeDate.Text
                };
                mspe = pointSettei_bl.M_StorePoint_Select(mspe);
                if (mspe != null)
                {
                    txtChangeDate.Text     = mspe.ChangeDate;
                    txtPointRate.Text      = mspe.PointRate;
                    txtServiceDayRate.Text = mspe.ServicedayRate;
                    txtExperationDate.Text = mspe.ExpirationDate;
                    txtMaxPoint.Text       = string.IsNullOrWhiteSpace(mspe.MaxPoint)? "0" : mspe.MaxPoint;
                    txtTicketUnit.Text     = string.IsNullOrWhiteSpace(mspe.TicketUnit)? "0" : mspe.TicketUnit;

                    txtPrint1.Text = mspe.Print1;
                    txtSize1.Text  = mspe.Size1 == "0" ? string.Empty: mspe.Size1;
                    chk1.Checked   = mspe.Bold1 == "1" ? true : false;

                    txtPrint2.Text = mspe.Print2;
                    txtSize2.Text  = mspe.Size2 == "0" ? string.Empty : mspe.Size2;
                    chk2.Checked   = mspe.Bold2 == "1" ? true : false;

                    txtPrint3.Text = mspe.Print3;
                    txtSize3.Text  = mspe.Size3 == "0" ? string.Empty : mspe.Size3;
                    chk3.Checked   = mspe.Bold3 == "1" ? true : false;

                    txtPrint4.Text = mspe.Print4;
                    txtSize4.Text  = mspe.Size4 == "0" ? string.Empty : mspe.Size4;
                    chk4.Checked   = mspe.Bold4 == "1" ? true : false;

                    txtPrint5.Text = mspe.Print5;
                    txtSize5.Text  = mspe.Size5 == "0" ? string.Empty : mspe.Size5;
                    chk5.Checked   = mspe.Bold5 == "1" ? true : false;

                    txtPrint6.Text = mspe.Print6;
                    txtSize6.Text  = mspe.Size6 == "0" ? string.Empty : mspe.Size6;
                    chk6.Checked   = mspe.Bold6 == "1" ? true : false;

                    txtPrint7.Text = mspe.Print7;
                    txtSize7.Text  = mspe.Size7 == "0" ? string.Empty : mspe.Size7;
                    chk7.Checked   = mspe.Bold7 == "1" ? true : false;

                    txtPrint8.Text = mspe.Print8;
                    txtSize8.Text  = mspe.Size8 == "0" ? string.Empty : mspe.Size8;
                    chk8.Checked   = mspe.Bold8 == "1" ? true : false;

                    txtPrint9.Text = mspe.Print9;
                    txtSize9.Text  = mspe.Size9 == "0" ? string.Empty : mspe.Size9;
                    chk9.Checked   = mspe.Bold9 == "1" ? true : false;

                    txtPrint10.Text = mspe.Print10;
                    txtSize10.Text  = mspe.Size10 == "0" ? string.Empty : mspe.Size10;
                    chk10.Checked   = mspe.Bold10 == "1" ? true : false;

                    txtPrint11.Text = mspe.Print11;
                    txtSize11.Text  = mspe.Size11 == "0" ? string.Empty : mspe.Size11;
                    chk11.Checked   = mspe.Bold11 == "1" ? true : false;

                    txtPrint12.Text = mspe.Print12;
                    txtSize12.Text  = mspe.Size12 == "0" ? string.Empty : mspe.Size12;
                    chk12.Checked   = mspe.Bold12 == "1" ? true : false;
                }
            }
        }
        public bool M_StorePoint_Insert_Update(M_StorePoint_Entity mspe)
        {
            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@StoreCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.StoreCD
                  } },
                { "@ChangeDate", new ValuePair {
                      value1 = SqlDbType.Date, value2 = mspe.ChangeDate
                  } },
                { "@PointRate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.PointRate
                  } },
                { "@ServicedayRate", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.ServicedayRate
                  } },
                { "@ExpirationDate", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.ExpirationDate
                  } },
                { "@MaxPoint", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.MaxPoint
                  } },
                { "@TicketUnit", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.TicketUnit
                  } },

                { "@Print1", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print1
                  } },
                { "@Size1", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size1
                  } },
                { "@Bold1", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold1
                  } },

                { "@Print2", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print2
                  } },
                { "@Size2", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size2
                  } },
                { "@Bold2", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold2
                  } },

                { "@Print3", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print3
                  } },
                { "@Size3", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size3
                  } },
                { "@Bold3", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold3
                  } },

                { "@Print4", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print4
                  } },
                { "@Size4", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size4
                  } },
                { "@Bold4", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold4
                  } },

                { "@Print5", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print5
                  } },
                { "@Size5", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size5
                  } },
                { "@Bold5", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold5
                  } },

                { "@Print6", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print6
                  } },
                { "@Size6", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size6
                  } },
                { "@Bold6", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold6
                  } },

                { "@Print7", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print7
                  } },
                { "@Size7", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size7
                  } },
                { "@Bold7", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold7
                  } },

                { "@Print8", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print8
                  } },
                { "@Size8", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size8
                  } },
                { "@Bold8", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold8
                  } },

                { "@Print9", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print9
                  } },
                { "@Size9", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size9
                  } },
                { "@Bold9", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold9
                  } },

                { "@Print10", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print10
                  } },
                { "@Size10", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size10
                  } },
                { "@Bold10", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold10
                  } },

                { "@Print11", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print11
                  } },
                { "@Size11", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size11
                  } },
                { "@Bold11", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold11
                  } },

                { "@Print12", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Print12
                  } },
                { "@Size12", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Size12
                  } },
                { "@Bold12", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.Bold12
                  } },

                { "@DeleteFlg", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = mspe.DeleteFlg
                  } },
                { "@Operator", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.InsertOperator
                  } },
                { "@Program", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.ProgramID
                  } },
                { "@PC", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.PC
                  } },
                { "@OperateMode", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.ProcessMode
                  } },
                { "@KeyItem", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = mspe.Key
                  } },
            };

            UseTransaction = true;
            return(InsertUpdateDeleteData(dic, "M_StorePoint_Insert_Update"));
        }