using FineAdmin.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace FineAdmin.Web.Areas.SysSet.Models
{
public class WebModel
{
///
/// 网站名称
///
public string SiteName { get; set; }
///
/// 网站域名
///
public string SiteDomain { get; set; }
///
/// 公司名称
///
public string Corporate { get; set; }
///
/// 公司地址
///
public string Address { get; set; }
///
/// 公司座机
///
public string Tel { get; set; }
///
/// 联系电话
///
public string Phone { get; set; }
///
/// 电子邮箱
///
public string Email { get; set; }
///
/// 首页标题
///
public string HomeTitle { get; set; }
///
/// META关键词:多个关键词用英文状态 , 号分割
///
public string MetaKey { get; set; }
///
/// META描述
///
public string MetaDescribe { get; set; }
///
/// 网站备案号
///
public string Record { get; set; }
///
/// 版权信息
///
public string CopyRight { get; set; }
public WebModel GetWebInfo()
{
return new WebModel
{
SiteName = Configs.GetValue("SiteName"),
SiteDomain = Configs.GetValue("SiteDomain"),
Corporate = Configs.GetValue("Corporate"),
Address = Configs.GetValue("Address"),
Tel = Configs.GetValue("Tel"),
Phone = Configs.GetValue("Phone"),
Email = Configs.GetValue("Email"),
HomeTitle = Configs.GetValue("HomeTitle"),
MetaKey = Configs.GetValue("MetaKey"),
MetaDescribe = Configs.GetValue("MetaDescribe"),
Record = Configs.GetValue("Record"),
CopyRight = Configs.GetValue("CopyRight")
};
}
public void SetWebInfo(WebModel model)
{
Configs.SetValue("SiteName", model.SiteName);
Configs.SetValue("SiteDomain", model.SiteDomain);
Configs.SetValue("Corporate", model.Corporate);
Configs.SetValue("Address", model.Address);
Configs.SetValue("Tel", model.Tel);
Configs.SetValue("Phone", model.Phone);
Configs.SetValue("Email", model.Email);
Configs.SetValue("HomeTitle", model.HomeTitle);
Configs.SetValue("MetaKey", model.MetaKey);
Configs.SetValue("MetaDescribe", model.MetaDescribe);
Configs.SetValue("Record", model.Record);
Configs.SetValue("CopyRight", model.CopyRight);
}
}
}