예제 #1
0
        private void AddNewHD()
        {
            string sql = "HD_NHAP_COMPLETE '" + UserInformation.PQ +
                         "','" + UserInformation.MaDV +
                         "','" + lblMaHD.Text +
                         "','" + txtMaKH.Text.Trim() +
                         "','" + txtTienChieuKhauHD.Text.Trim() + "', 'C'";

            int _ok = DatLoa.AddNew(sql);

            if (_ok > 0)
            {
                _pMode = "";
                if (LOAI == "X")
                {
                    PRINT_XUAT();
                }
                else if (LOAI == "N")
                {
                    PRINT_NHAP();
                }

                if (MA_HD == "")
                {
                    lblMaHD.Text = DatLoa.CreatMAHD("HD_NHAP_WAIT", LOAI);
                    ViewMode();
                    loadData();
                }
                else
                {
                    lblMaHD.Text = MA_HD;
                }
            }
        }