Beispiel #1
0
        private void EditCommutatorType(int CommutatorTypeId)
        {
            this.CommutatorType = this.srvCommutatorType.GetById(CommutatorTypeId);

            this.ClearDetailControls();
            this.LoadFormFromEntity();
            this.frmCommutatorType.HiddenDetail(false);
            this.ShowDetail(true);
        }
Beispiel #2
0
        public override CommutatorType GetSearchResult()
        {
            CommutatorType CommutatorType = null;
            UltraGridRow   activeRow      = this.grdSchSearch.ActiveRow;

            if (activeRow != null)
            {
                int CommutatorTypeId = Convert.ToInt32(activeRow.Cells[0].Value);
                CommutatorType = this.srvCommutatorType.GetById(CommutatorTypeId);
            }

            return(CommutatorType);
        }
Beispiel #3
0
 private void DeleteEntity(int CommutatorTypeId)
 {
     if (MessageBox.Show("¿Esta seguro de eliminar el Tipo de Conmutador?", "Advertencia",
                         MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
     {
         return;
     }
     this.CommutatorType           = this.srvCommutatorType.GetById(CommutatorTypeId);
     this.CommutatorType.Activated = false;
     this.CommutatorType.Deleted   = true;
     this.srvCommutatorType.SaveOrUpdate(this.CommutatorType);
     this.Search();
 }
Beispiel #4
0
 private void btnSchCreate_Click(object sender, EventArgs e)
 {
     this.CommutatorType = new CommutatorType();
     this.ClearDetailControls();
     this.ShowDetail(true);
 }