Пример #1
0
        private void clearBtn_Click(object sender, EventArgs e)
        {
            XFsafeInfo xfinfo = new XFsafeInfo();

            xfinfo.ManagerName   = string.Empty;
            xfinfo.XFTelephone   = string.Empty;
            xfinfo.HasSafeSystem = string.Empty;
            xfinfo.DianXiaoJian  = string.Empty;
            xfinfo.HasSafeBook   = string.Empty;

            SetData(xfinfo);
        }
Пример #2
0
        public XFsafeInfo GetData()
        {
            XFsafeInfo info = new XFsafeInfo();

            info.ManagerName = this.ManagerName.Text;
            info.XFTelephone = this.Telephone.Text;
            RadioButton[] rb1 = { radioButton6, radioButton3 };
            info.HasSafeSystem = Global.rbcheck(rb1);
            RadioButton[] rb2 = { radioButton2, radioButton1 };
            info.DianXiaoJian = Global.rbcheck(rb2);
            RadioButton[] rb3 = { radioButton5, radioButton4 };
            info.HasSafeBook = Global.rbcheck(rb3);

            return(info);
        }
Пример #3
0
 public void SetData(XFsafeInfo info)
 {
     this.ManagerName.Text = info.ManagerName;
     this.Telephone.Text   = info.XFTelephone;
     if (info.HasSafeSystem == "1")
     {
         radioButton6.Checked = true;
     }
     else if (info.HasSafeSystem == "1")
     {
         radioButton3.Checked = true;
     }
     else
     {
         radioButton6.Checked = false; radioButton3.Checked = false;
     }
     if (info.DianXiaoJian == "1")
     {
         radioButton2.Checked = true;
     }
     else if (info.DianXiaoJian == "1")
     {
         radioButton1.Checked = true;
     }
     else
     {
         radioButton2.Checked = false; radioButton1.Checked = false;
     }
     if (info.HasSafeBook == "1")
     {
         radioButton5.Checked = true;
     }
     else if (info.HasSafeBook == "1")
     {
         radioButton4.Checked = true;
     }
     else
     {
         radioButton5.Checked = false; radioButton4.Checked = false;
     }
 }