Ejemplo n.º 1
0
 private void buttonX1_Click(object sender, EventArgs e)
 {
     if(textBoxX1.Text!="")
         {
             ThucDon.InsertThucDon thucdon = new ThucDon.InsertThucDon();
             thucdon.InsertDanhMucThucDon(textBoxX1.Text, Nhom);
             this.Close();
         }
 }
Ejemplo n.º 2
0
 private void buttonX1_Click(object sender, EventArgs e)
 {
     if (textBoxX1.Text != "")
     {
         ThucDon.InsertThucDon thucdon = new ThucDon.InsertThucDon();
         thucdon.InsertNhomDanhMuc(textBoxX1.Text);
         this.Close();
     }
     else
     {
         MessageBox.Show("Bạn chưa điền tên");
     }
 }
Ejemplo n.º 3
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (txtDonVi.Text != "")
            {
                try
                {
                    ThucDon.InsertThucDon thucdon = new ThucDon.InsertThucDon();
                    thucdon.InsertDonVi(txtDonVi.Text);
                    this.Close();
                }
                catch (Exception)
                {

                    MessageBox.Show("Có lỗi");
                }
            }
            else
            {
                MessageBox.Show("Bạn chưa nhập đơn vị");
            }
        }
Ejemplo n.º 4
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            try
            {
                ThucDon.InsertThucDon thucdon = new ThucDon.InsertThucDon();
                if(txtThucDon.Text!=""&& txtGiaBan.Text!="")
                {
                string TenMonAn = txtThucDon.Text;
                string DonVi = comboTreeDonVi.Text;
                checkso(txtGiaBan);
                float Gia = a;
                string Anh = path;
                int MaDanhMucThucDon = Convert.ToInt32(comboTreeDanhMuc.SelectedValue.ToString());
                if (checkBoxXThucDon.Checked)
                {
                    checkso(txtGiaNguyenLieu);
                   float GiaNguyenLieu = a;
                    int MaDanhMucNguyenLieu = Convert.ToInt32(cbDanhMucNguyenLieu.SelectedValue.ToString());
                  KhoHang.Model.InsertKho insert = new KhoHang.Model.InsertKho();
                    thucdon.InsertMonAn(TenMonAn, DonVi, Gia, Anh, MaDanhMucThucDon);
                   insert.InsertNguyenLieu(TenMonAn, DonVi, Gia, MaDanhMucNguyenLieu);

                }
                else
                {
                    thucdon.InsertMonAn(TenMonAn, DonVi, Gia, Anh, MaDanhMucThucDon);
                }

                this.Close();
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }