Пример #1
0
        public override object PerformSelectOneObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh rex_Dm_Tpgiadinh = new Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh();
            try
            {
                int     focusedRow = gridView1.GetDataSourceRowIndex(gridView1.FocusedRowHandle);
                DataRow dr         = ds_Tpgiadinh.Tables[0].Rows[focusedRow];
                if (dr != null)
                {
                    rex_Dm_Tpgiadinh.Id_Tpgiadinh  = dr["Id_Tpgiadinh"];
                    rex_Dm_Tpgiadinh.Ma_Tpgiadinh  = dr["Ma_Tpgiadinh"];
                    rex_Dm_Tpgiadinh.Ten_Tpgiadinh = dr["Ten_Tpgiadinh"];
                }
                Selected_Rex_Dm_Tpgiadinh = rex_Dm_Tpgiadinh;
                this.Dispose();
                this.Close();
                return(rex_Dm_Tpgiadinh);
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
                return(null);
            }
        }
Пример #2
0
        public object DeleteObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh objRex_Dm_Tpgiadinh = new Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh();
            objRex_Dm_Tpgiadinh.Id_Tpgiadinh = gridView1.GetFocusedRowCellValue("Id_Tpgiadinh");

            return(objMasterService.Delete_Rex_Dm_Tpgiadinh(objRex_Dm_Tpgiadinh));
        }
Пример #3
0
        public object InsertObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh objRex_Dm_Tpgiadinh = new Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh();
            objRex_Dm_Tpgiadinh.Id_Tpgiadinh  = -1;
            objRex_Dm_Tpgiadinh.Ma_Tpgiadinh  = txtMa_Tpgiadinh.EditValue;
            objRex_Dm_Tpgiadinh.Ten_Tpgiadinh = txtTen_Tpgiadinh.EditValue;

            return(objMasterService.Insert_Rex_Dm_Tpgiadinh(objRex_Dm_Tpgiadinh));
        }
Пример #4
0
        public object UpdateObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh objRex_Dm_Tpgiadinh = new Ecm.WebReferences.MasterService.Rex_Dm_Tpgiadinh();
            objRex_Dm_Tpgiadinh.Id_Tpgiadinh  = gridView1.GetFocusedRowCellValue("Id_Tpgiadinh");
            objRex_Dm_Tpgiadinh.Ma_Tpgiadinh  = txtMa_Tpgiadinh.EditValue;
            objRex_Dm_Tpgiadinh.Ten_Tpgiadinh = txtTen_Tpgiadinh.EditValue;


            return(objMasterService.Update_Rex_Dm_Tpgiadinh(objRex_Dm_Tpgiadinh));
        }