Exemple #1
0
        public override object PerformSelectOneObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl rex_Dm_Loai_Ktkl = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl();
            try
            {
                int     focusedRow = gridView1.GetDataSourceRowIndex(gridView1.FocusedRowHandle);
                DataRow dr         = ds_Loai_Ktkl.Tables[0].Rows[focusedRow];
                if (dr != null)
                {
                    rex_Dm_Loai_Ktkl.Id_Loai_Ktkl  = dr["Id_Loai_Ktkl"];
                    rex_Dm_Loai_Ktkl.Ma_Loai_Ktkl  = dr["Ma_Loai_Ktkl"];
                    rex_Dm_Loai_Ktkl.Ten_Loai_Ktkl = dr["Ten_Loai_Ktkl"];
                }
                Selected_Rex_Dm_Loai_Ktkl = rex_Dm_Loai_Ktkl;
                this.Dispose();
                this.Close();
                return(rex_Dm_Loai_Ktkl);
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
                return(null);
            }
        }
Exemple #2
0
        public object DeleteObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl objRex_Dm_Loai_Ktkl = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl();
            objRex_Dm_Loai_Ktkl.Id_Loai_Ktkl = gridView1.GetFocusedRowCellValue("Id_Loai_Ktkl");

            return(objMasterService.Delete_Rex_Dm_Loai_Ktkl(objRex_Dm_Loai_Ktkl));
        }
Exemple #3
0
        public object InsertObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl objRex_Dm_Loai_Ktkl = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl();
            objRex_Dm_Loai_Ktkl.Id_Loai_Ktkl  = -1;
            objRex_Dm_Loai_Ktkl.Ma_Loai_Ktkl  = txtMa_Loai_Ktkl.EditValue;
            objRex_Dm_Loai_Ktkl.Ten_Loai_Ktkl = txtTen_Loai_Ktkl.EditValue;

            return(objMasterService.Insert_Rex_Dm_Loai_Ktkl(objRex_Dm_Loai_Ktkl));
        }
Exemple #4
0
        public object UpdateObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl objRex_Dm_Loai_Ktkl = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Ktkl();
            objRex_Dm_Loai_Ktkl.Id_Loai_Ktkl  = gridView1.GetFocusedRowCellValue("Id_Loai_Ktkl");
            objRex_Dm_Loai_Ktkl.Ma_Loai_Ktkl  = txtMa_Loai_Ktkl.EditValue;
            objRex_Dm_Loai_Ktkl.Ten_Loai_Ktkl = txtTen_Loai_Ktkl.EditValue;


            return(objMasterService.Update_Rex_Dm_Loai_Ktkl(objRex_Dm_Loai_Ktkl));
        }