Exemple #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");
             }
         }
     }
 }
Exemple #2
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;
                }
            }
        }