示例#1
0
        public Rules GetRulesInformation()
        {
            var rowRule =
                      sqlHelper.GetDataRow("select * from CompanyCategoryContent where CompanyId =" + Strings.Company.RuleCompanyId);

            var ourRulesInfo = new Rules()
            {
                Id = Convert.ToInt32(Strings.Company.RuleCompanyId),
                Description = rowRule["Description"].ToString(),
                ImageUrl = rowRule["ImageUrl"].ToString(),
                Title = rowRule["Title"].ToString()
            };

            return ourRulesInfo;
        }
示例#2
0
        public void UpdateRulesInformation(Rules rulesItem)
        {
            const string sqlInsert =
                    "Update CompanyCategoryContent set Title=@Title , Description=@Description ,ImageUrl=@ImageUrl where CompanyId = @CompanyId";

                SqlParameter[] sqlParamArray =
                {
                    new SqlParameter("@Title", SqlDbType.NVarChar)
                        {
                            Value =
                                rulesItem.Title
                        },
                    new SqlParameter("@Description", SqlDbType.NVarChar)
                        {
                            Value =
                                rulesItem
                                .Description
                        },
                    new SqlParameter("@ImageUrl", SqlDbType.NVarChar)
                        {
                            Value =
                                rulesItem
                                .ImageUrl
                        },
                    new SqlParameter("@CompanyId", SqlDbType.Int)
                        {
                            Value =
                                Strings
                                .Company
                                .RuleCompanyId
                        }
                };

                sqlHelper.Cmd(sqlInsert, sqlParamArray);
        }
示例#3
0
 public void UpdateRulesInformation(Rules rulesItem)
 {
     _companyRepository.UpdateRulesInformation(rulesItem);
 }