public Farabi GetFarabiInformation() { var rowFarabi = sqlHelper.GetDataRow("select * from CompanyCategoryContent where CompanyId =" + Strings.Company.FarabiCompanyId); var farabiInfo = new Farabi() { Id = Convert.ToInt32(Strings.Company.FarabiCompanyId), Description = rowFarabi["Description"].ToString(), ImageUrl = rowFarabi["ImageUrl"].ToString(), Title = rowFarabi["Title"].ToString() }; return farabiInfo; }
public void UpdateFarabiInformation(Farabi farabiItem) { const string sqlInsert = "Update CompanyCategoryContent set Title=@Title , Description=@Description ,ImageUrl=@ImageUrl where CompanyId = @CompanyId"; SqlParameter[] sqlParamArray = { new SqlParameter("@Title", SqlDbType.NVarChar) { Value = farabiItem.Title }, new SqlParameter("@Description", SqlDbType.NVarChar) { Value = farabiItem .Description }, new SqlParameter("@ImageUrl", SqlDbType.NVarChar) { Value = farabiItem .ImageUrl }, new SqlParameter("@CompanyId", SqlDbType.Int) { Value = Strings .Company .FarabiCompanyId } }; sqlHelper.Cmd(sqlInsert, sqlParamArray); }
public void UpdateFarabiInformation(Farabi farabiItem) { _companyRepository.UpdateFarabiInformation(farabiItem); }