/// <summary> /// Saves the data. /// </summary> /// <returns></returns> protected override string SaveData() { var result = _fixedAssetCategoryPresenter.Save(); if (!String.IsNullOrEmpty(result)) { GlobalVariable.FixedAssetCategoryDetailForm = result; } return(result); }
/// <summary> /// Saves the data. /// </summary> /// <returns></returns> protected override int SaveData() { int i; try { i = _fixedAssetCategoryPresenter.Save(); } catch (Exception ex) { i = 0; if (ex.Message.Contains("IX_FixedAssetCategory_FixedAssetCategoryCode")) { XtraMessageBox.Show(string.Format(ResourceHelper.GetResourceValueByName("ResFixedAssetCategoryAlreadyExists"), FixedAssetCategoryCode), ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); txtFixedAssetCategoryCode.Focus(); } else { XtraMessageBox.Show(ex.Message, ResourceHelper.GetResourceValueByName("ResDetailContent"), MessageBoxButtons.OK, MessageBoxIcon.Error); } } return(i); }