public object DeleteObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca objRex_Dm_Heso_Giotangca = new Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca();
            objRex_Dm_Heso_Giotangca.Id_Heso_Giotangca = gvwrex_Dm_Heso_Giotangca.GetFocusedRowCellValue("Id_Heso_Giotangca");

            return(objMasterService.Delete_Rex_Dm_Heso_Giotangca(objRex_Dm_Heso_Giotangca));
        }
        public override object PerformSelectOneObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca rex_Dm_Heso_Giotangca = new Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca();
            try
            {
                int     focusedRow = gvwrex_Dm_Heso_Giotangca.GetDataSourceRowIndex(gvwrex_Dm_Heso_Giotangca.FocusedRowHandle);
                DataRow dr         = ds_Heso_Giotangca.Tables[0].Rows[focusedRow];
                if (dr != null)
                {
                    rex_Dm_Heso_Giotangca.Id_Heso_Giotangca  = dr["Id_Heso_Giotangca"];
                    rex_Dm_Heso_Giotangca.Ma_Heso_Giotangca  = dr["Ma_Heso_Giotangca"];
                    rex_Dm_Heso_Giotangca.Ten_Heso_Giotangca = dr["Ten_Heso_Giotangca"];
                    rex_Dm_Heso_Giotangca.Heso         = dr["Heso"];
                    rex_Dm_Heso_Giotangca.Ngay_Batdau  = dr["Ngay_Batdau"];
                    rex_Dm_Heso_Giotangca.Ngay_Ketthuc = dr["Ngay_Ketthuc"];
                }
                Selected_Rex_Dm_Heso_Giotangca = rex_Dm_Heso_Giotangca;
                this.Dispose();
                this.Close();
                return(rex_Dm_Heso_Giotangca);
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
                return(null);
            }
        }
        public object InsertObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca objRex_Dm_Heso_Giotangca = new Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca();

            objRex_Dm_Heso_Giotangca.Ma_Heso_Giotangca  = txtMa_Heso_Giotangca.EditValue;
            objRex_Dm_Heso_Giotangca.Ten_Heso_Giotangca = txtTen_Heso_Giotangca.EditValue;
            objRex_Dm_Heso_Giotangca.Heso         = txtHeso.EditValue;
            objRex_Dm_Heso_Giotangca.Ngay_Batdau  = dtNgay_Batdau.EditValue;
            objRex_Dm_Heso_Giotangca.Ngay_Ketthuc = dtNgay_Ketthuc.EditValue;

            return(objMasterService.Insert_Rex_Dm_Heso_Giotangca(objRex_Dm_Heso_Giotangca));
        }
        public object UpdateObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca objRex_Dm_Heso_Giotangca = new Ecm.WebReferences.MasterService.Rex_Dm_Heso_Giotangca();
            objRex_Dm_Heso_Giotangca.Id_Heso_Giotangca = gvwrex_Dm_Heso_Giotangca.GetFocusedRowCellValue("Id_Heso_Giotangca");

            objRex_Dm_Heso_Giotangca.Ma_Heso_Giotangca  = txtMa_Heso_Giotangca.EditValue;
            objRex_Dm_Heso_Giotangca.Ten_Heso_Giotangca = txtTen_Heso_Giotangca.EditValue;
            objRex_Dm_Heso_Giotangca.Heso         = txtHeso.EditValue;
            objRex_Dm_Heso_Giotangca.Ngay_Batdau  = dtNgay_Batdau.EditValue;
            objRex_Dm_Heso_Giotangca.Ngay_Ketthuc = dtNgay_Batdau.EditValue;

            return(objMasterService.Update_Rex_Dm_Heso_Giotangca(objRex_Dm_Heso_Giotangca));
        }