// Method to add the service/product public static int AddServiceAndProducts(CompanyModel.ServiceProduct objServiceProc) { int intResult = 0; using (DALHelper dalHelper = new DALHelper()) { dalHelper.OpenConnectionWithTransaction(); intResult = dalHelper.GetDAL_CompanyDetails(true).AddServiceAndProducts(objServiceProc); dalHelper.EndConnectionAndCommitTransaction(); } return(intResult); }
// Method to update the services and clients public static int UpdateSerProBySerProID(CompanyModel.ServiceProduct ObjUpSerPro) { int intResult = 0; using (DALHelper dalHelper = new DALHelper()) { try { dalHelper.OpenConnectionWithTransaction(); intResult = dalHelper.GetDAL_CompanyDetails(true).UpdateSerProBySerProID(ObjUpSerPro); dalHelper.EndConnectionAndCommitTransaction(); } catch (Exception) { dalHelper.EndConnectionAndRollBackTransaction(); throw; } } return(intResult); }