protected override void Loading() { if (!IsAdd) { var obj = BaseInfoStaff.FindById(long.Parse(ItemID)); FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1); } else { ctDateOfEmployment.Value = DateTime.Now.Date; } }
protected override void Saving() { if (IsAdd) { var obj = BaseInfoStaff.New; FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1); obj.OptrType = UserStatics.OptrType; obj.Save(); } else { var obj = BaseInfoStaff.FindById(long.Parse(ItemID)); FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1); obj.OptrType = UserStatics.OptrType; obj.Save(); } }
internal static void DelCell(long id) { BaseInfoStaff.DeleteAll(CK.K["Id"] == id); }