/// <summary> /// Function to save service category /// </summary> public void SaveFunction() { try { ServiceCategoryInfo infoServiceCategory = new ServiceCategoryInfo(); ServiceCategorySP spServiceCategory = new ServiceCategorySP(); infoServiceCategory.CategoryName = txtServiceCategory.Text.Trim(); infoServiceCategory.Narration = txtNarration.Text.Trim(); infoServiceCategory.Extra1 = string.Empty; infoServiceCategory.Extra2 = string.Empty; if (spServiceCategory.ServiceCategoryCheckIfExist(txtServiceCategory.Text.Trim().ToString(), 0) == false) { decId = spServiceCategory.ServiceCategoryAddSpecificFields1(infoServiceCategory); Messages.SavedMessage(); Clear(); } else { Messages.InformationMessage("Service category name already exist"); txtServiceCategory.Focus(); } } catch (Exception ex) { MessageBox.Show("SC3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to add values to ServiceCategory Table /// </summary> /// <param name="servicecategoryinfo"></param> /// <returns></returns> public decimal ServiceCategoryAddSpecificFields1(ServiceCategoryInfo servicecategoryinfo) { decimal decId = 0; try { decId = spServiceCatogory.ServiceCategoryAddSpecificFields1(servicecategoryinfo); } catch (Exception ex) { MessageBox.Show("SC3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(decId); }