//Tạo mã tiền án tiền sự
        public string GenerateMaTienAnTienSu()
        {
            sotamtru = new SoTamTruBUS();
            string last_ID = TrinhTaoMa.getLastID_MaTienAnTienSu();

            return(TrinhTaoMa.TangMa9kytu(last_ID));
        }
Example #2
0
        private void dGVTienAnTienSu_UserAddedRow(object sender, DataGridViewRowEventArgs e)
        {
            useradd(dGVTienAnTienSu);
            int lastRow = dGVTienAnTienSu.Rows.Count - 2;

            dGVTienAnTienSu[0, lastRow].Value = TrinhTaoMa.TangMa9kytu(TrinhTaoMa.getLastID_MaTienAnTienSu());
            dGVTienAnTienSu[1, lastRow].Value = tbmadinhdanh.Text.ToString();
        }