protected override void Saving() { if (IsAdd) { var obj = AttendanceRate.New; BindControlsDecimal.BindControlsToObject(obj, tabPage1); obj.OptrType = UserStatics.OptrType; obj.Save(); } else if (IsAdd == false) { var obj = AttendanceRate.FindById(long.Parse(ItemID)); BindControlsDecimal.BindControlsToObject(obj, tabPage1); obj.Save(); } }
protected override void Saving() { if (!IsAdd) { var obj = BaseInfoMaterial.FindById(long.Parse(ItemID)); BindControlsDecimal.BindControlsToObject(obj, tabPage1); BindControlsDecimal.BindControlsToObject(obj, tabPage2); obj.Save(); } else { var obj = BaseInfoMaterial.New; BindControlsDecimal.BindControlsToObject(obj, tabPage1); BindControlsDecimal.BindControlsToObject(obj, tabPage2); obj.OptrType = UserStatics.OptrType; obj.Save(); ItemID = obj.Id.ToString(); IsSaved = true; } }