Ejemplo n.º 1
0
        private void SaveDataChiTiet(int ID_QuyetDinh)
        {
            //Save data chi tiet
            clsQD_NhapVatTu_ChiTiet clsChiTiet = new clsQD_NhapVatTu_ChiTiet();

            clsChiTiet.ID_QuyetDinh = Convert.ToInt32(ID_QuyetDinh);
            clsChiTiet.DeleteWID_QuyetDinhLogic();
            for (int i = fgChiTiet.Rows.Fixed; i < fgChiTiet.Rows.Count; i++)
            {
                if (fgChiTiet.GetBoolValue(i, "Chon"))
                {
                    clsChiTiet.ID_VatTu = fgChiTiet.GetIntValue(i, "ID_VatTu");
                    clsChiTiet.ID_Kho   = fgChiTiet.GetIntValue(i, "ID_Kho");
                    clsChiTiet.SoLuong  = fgChiTiet.GetIntValue(i, "SoLuong");
                    clsChiTiet.Insert();
                }
            }
        }
Ejemplo n.º 2
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            if (!IsValid())
            {
                return;
            }
            clsQD_NhapVatTu_ChiTiet cls = new clsQD_NhapVatTu_ChiTiet();

            cls.ID_QuyetDinh = m_iID_QuyetDinh;
            cls.DeleteWID_QuyetDinhLogic();
            for (int i = fg.Rows.Fixed; i < fg.Rows.Count; i++)
            {
                if (fg.GetBoolValue(i, "Chon"))
                {
                    cls.ID_VatTu = fg.GetIntValue(i, "ID_VatTu");
                    cls.ID_Kho   = fg.GetIntValue(i, "ID_Kho");
                    cls.SoLuong  = fg.GetIntValue(i, "SoLuong");
                    cls.Insert();
                }
            }
            BaseMessages.ShowInformationMessage("Cập nhật thành công!");
            LockEdit(true);
            Loadfg();
        }