public ServiceResponse <string> ModifyServiceContactDetail(ServiceContactDetailModel serviceContactDetail) { var sRes = new ServiceResponse <string>(); try { if (serviceContactDetailBAL.ModifyServiceContactDetail(serviceContactDetail) > 0) { sRes.StatusCode = 200; } else { sRes.StatusCode = (int)HttpStatusCode.InternalServerError;; } } catch (Exception ex) { sRes.StatusCode = (int)HttpStatusCode.InternalServerError; if (ex.InnerException != null) { sRes.Messages.Add(ex.InnerException.ToString()); } } return(sRes); }
public int ModifyServiceContactDetail(ServiceContactDetailModel model) { SqlParameter[] param = { new SqlParameter("@Type", model.Type), new SqlParameter("@ID", model.Id), new SqlParameter("@Services", model.Services), new SqlParameter("@Name", model.Name), new SqlParameter("@Address", model.Address), new SqlParameter("@ContactDetails", model.ContactDetails) }; return(Convert.ToInt16(SqlHelper.ExecuteScalar(System.Data.CommandType.StoredProcedure, "USP_ServicesContactDetail", param))); }
public List <ServiceContactDetailModel> GetServiceContactDetail(ServiceContactDetailModel model) { List <ServiceContactDetailModel> lstServiceContactDetail = new List <ServiceContactDetailModel>(); SqlParameter[] param = { new SqlParameter("@Type", model.Type), new SqlParameter("@ID", model.Id) }; DataSet dsResult = SqlHelper.ExecuteDataset(System.Data.CommandType.StoredProcedure, "USP_ServicesContactDetail", param); if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { lstServiceContactDetail = DataTableMappingtoModel.MappingToEntity <ServiceContactDetailModel>(dsResult.Tables[0]); } return(lstServiceContactDetail); }
public ServiceResponse <ServiceContactDetailModel> GetServiceContactDetail(ServiceContactDetailModel serviceContactDetail) { var lstSr = new ServiceResponse <ServiceContactDetailModel>(); try { var result = serviceContactDetailBAL.GetServiceContactDetail(serviceContactDetail); lstSr.StatusCode = (int)HttpStatusCode.OK; } catch (Exception ex) { lstSr.StatusCode = (int)HttpStatusCode.InternalServerError; if (ex.InnerException != null) { lstSr.Messages.Add(ex.InnerException.ToString()); } } return(lstSr); }
/// <summary> /// /// </summary> /// <param name="Documentmdl"></param> /// <returns></returns> public List <ServiceContactDetailModel> GetServiceContactDetail(ServiceContactDetailModel serviceContactDetail) { return(serviceContactDetailDAL.GetServiceContactDetail(serviceContactDetail)); }
/// <summary> /// /// </summary> /// <param name="Documentmdl"></param> /// <returns></returns> public int ModifyServiceContactDetail(ServiceContactDetailModel serviceContactDetail) { return(serviceContactDetailDAL.ModifyServiceContactDetail(serviceContactDetail)); }