private void comboBoxMaTS_SelectedValueChanged(object sender, EventArgs e)
        {
            List <string> myList = bll.GetThongTinTS(comboBoxMaTS.SelectedValue.ToString());

            textBoxMaCTT.Text = myList[0];
            comboBoxTenLoaiTS.SelectedItem = myList[1];
            comboBoxPhong.SelectedItem     = myList[2];
            textBoxTenTS.Text         = myList[3];
            textBoxGhiChu.Text        = myList[4];
            textBoxTSKT.Text          = myList[5];
            numericUpDownTyLeHM.Value = decimal.Parse(myList[6]);
            numericUpDownTyLeCL.Value = decimal.Parse(myList[7]);
            numericUpDown1.Minimum    = 1;
            numericUpDown1.Maximum    = bll.GetMaxSoLuong(comboBoxMaTS.SelectedValue.ToString());
        }
        private void comboBoxMaCTGiam_SelectedValueChanged(object sender, EventArgs e)
        {
            List <string> myList = bll.GetThongTinCTG(comboBoxMaCTGiam.SelectedValue.ToString());

            textBoxMaTS.Text             = myList[0].ToString();
            numericUpDownSoLuong.Maximum = int.Parse(myList[1].ToString()) + bll.GetMaxSoLuong(textBoxMaTS.Text);
            numericUpDownSoLuong.Value   = int.Parse(myList[1].ToString());
            dateTimePickerGhiGiam.Value  = DateTime.Parse(myList[2].ToString());
            textBoxNoiDung.Text          = myList[3].ToString();
            textBoxGhiChu.Text           = myList[4].ToString();
            textBoxThanhTien.Text        = myList[5].ToString();

            SoLuongCu = int.Parse(numericUpDownSoLuong.Value.ToString());
        }
示例#3
0
        private void comboBoxMaCTT_SelectedValueChanged(object sender, EventArgs e)
        {
            List <string> myList = bll.GetThongTinCTT(comboBoxMaCTT.SelectedValue.ToString());

            textBoxMaTS.Text             = myList[0];
            textBoxTenTS.Text            = myList[1];
            dateTimePickerGhiTang.Value  = DateTime.Parse(myList[2]);
            numericUpDownSoLuong.Minimum = bll.GetMaxSoLuongCTT(comboBoxMaCTT.SelectedValue.ToString()) - bll.GetMaxSoLuong(textBoxMaTS.Text);
            numericUpDownSoLuong.Value   = int.Parse(myList[3]);
            textBoxThanhTien.Text        = myList[4];
            textBoxNoiDung.Text          = myList[5];
            SoLuongCu = int.Parse(myList[3]);
            //textBoxDonGia.Text = ( ( 10 * int.Parse(myList[4] ) ) / ( 11 * int.Parse(myList[3]) ) ).ToString();
        }
示例#4
0
 private void comboBoxMaTS_SelectedValueChanged(object sender, EventArgs e)
 {
     numericUpDownSoLuong.Maximum = bll.GetMaxSoLuong(comboBoxMaTS.SelectedValue.ToString());
     textBoxDonGia.Text           = bll.GetDonGia(comboBoxMaTS.SelectedValue.ToString()).ToString();
 }