Ejemplo n.º 1
0
        /*private void bt_add_Click(object sender, EventArgs e)
         * {
         *  DateTime d;
         *  d = datetime_birtday.Value;
         *  string date = String.Format("{0:yyyy-MM-d}", d);
         *  string MSSV = txt_MSSV.Text;
         *  string name = txt_name.Text;
         *  string address = txt_address.Text;
         *  string phone = txt_phone.Text;
         *  string email = txt_email.Text;
         *  float dht = float.Parse(txt_dht.Text);
         *  int drl = int.Parse(txt_drl.Text);
         *  string gender;
         *  if (rb_male.Checked) gender = "True";
         *  else gender = "False";
         *  string idlop = bll.get_IDLop(cb_lop.SelectedItem.ToString());
         *
         *  bll.Add(MSSV, name, date, gender, address, phone, email, dht, drl, idlop);
         * }*/
        private void bt_add_Click(object sender, EventArgs e)
        {
            SV      mySV    = new SV();
            AddForm addform = new AddForm();

            if (addform.ShowDialog() == DialogResult.OK)
            {
                mySV       = addform.get();
                mySV.idlop = bll.get_IDLop(mySV.idlop);
                bll.Add(mySV);
            }
            this.show();
        }
Ejemplo n.º 2
0
        public void Add(SV mySV)
        {
            string MSSV     = mySV.mssv;
            string NameSV   = mySV.namesv;
            string BirthDay = mySV.birthday;
            bool   Gender   = mySV.gender;
            string Address  = mySV.address;
            string Mobile   = mySV.mobile;
            string Email    = mySV.email;
            float  DHT      = mySV.dht;
            int    DRL      = mySV.drl;
            string IDLop    = mySV.idlop;

            dal.Add(MSSV, NameSV, BirthDay, Gender, Address, Mobile, Email, DHT, DRL, IDLop);
        }