Exemplo n.º 1
0
        public string GetZagent()
        {
            if (Session[Util.ProjectConfig.ADMINUSER] == null)
            {
                return("-1");
            }
            StringBuilder json    = new StringBuilder();
            string        partner = "";
            string        zagent  = "";

            BLL.ConfigManager cm     = new BLL.ConfigManager();
            Model.Config      config = cm.GetConfigByOtype("默认股东");
            partner = config.Oval;
            config  = cm.GetConfigByOtype("默认总代");
            zagent  = config.Oval;
            IList <Agent> lists = DAL.AgentService.GetAgentByPartner(partner);

            json.Append("{\"a\":[");
            foreach (Agent ag in lists)
            {
                json.Append("{\"zagent\":\"");
                json.Append(ag.UserName);
                json.Append("\"},");
            }
            json.Remove(json.Length - 1, 1);
            json.Append("],\"b\":[{\"z1\":\"" + zagent + "\"}]}");

            return(json.ToString());
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var bll = new BLL.Channel();

            Channels = bll.GetChannels(ctx) ?? new List <Model.Channel>();

            var tb = bll.Select(ctx, new Model.Config()
            {
                State = 0, Code = "Logo"
            });

            if (tb != null && tb.Rows.Count > 0)
            {
                LogoConfig = tb.ToList <Model.Config>()[0];
            }

            var gcs = bll.Select(ctx, new GlobeConfig()
            {
                Code = "Copyright"
            }).ToList <Model.GlobeConfig>();

            if (gcs != null && gcs.Count > 0)
            {
                this.Copyright = gcs[0].Text;
            }
        }
Exemplo n.º 3
0
    public void BinData()
    {
        Model.Config config       = new Model.Config();
        ConfigSystem configSystem = new ConfigSystem();

        config       = configSystem.Get_Config();
        Content.Text = config.Contact;
    }
 public string InsertConfig(string otype, string oval, string remark)
 {
     try
     {
         Model.Config configModel = new Model.Config();
         configModel.Otype  = otype;
         configModel.Oval   = oval;
         configModel.Remark = remark;
         configModel.Status = "1";
         int configID = BLL.ConfigManager.InsertConfig(configModel);
         configModel.ID = configID;
         return(DAL.ObjectToJson.ObjectsToJson(configModel));
     }
     catch (Exception)
     {
         return("none");
     }
 }