protected override void Loading() { if (!IsAdd) { var optr = MainDictType.FindById(long.Parse(ItemID)); FrmAddEditBindComboBoxText.BindObjectToControls(optr, tabPage1); } if (UserStatics.OptrType != "All") { ctOptrType.Text = UserStatics.OptrType; } }
protected override void Saving() { if (IsAdd) { var optr = MainDictType.New; FrmAddEditBindComboBoxText.BindControlsToObject(optr, tabPage1); optr.Save(); } else { var optr = MainDictType.FindById(long.Parse(ItemID)); FrmAddEditBindComboBoxText.BindControlsToObject(optr, tabPage1); optr.Save(); } }