12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.OAShopManagement
- {
- public partial class frmMicroLetterPlatformConfig : LYFZ.Software.UI.OAShopManagement.frmMicroLetterPlatformConfig
- {
- LYFZ.BLL.BLL_ErpSystemConfigure config = new BLL.BLL_ErpSystemConfigure();
- LYFZ.Model.ModelAPPInterface model = new LYFZ.Model.ModelAPPInterface();
- public frmMicroLetterPlatformConfig()
- {
- this.btn_OK.Click += btn_OK_Click;
- model = config.GetModelAPPInterface();
- tb_AppUrlPath.Text = model.AppUrlPath;
- tb_AppID.Text = model.AppEnId;
- /* DataSet ds = config.GetSystemConfigure("*", "AppInterface");
- if(ds.Tables[0].Rows.Count>0)
- {
- model = config.GetModel(Convert.ToInt32(ds.Tables[0].Rows[0]["ID"]));
- try
- {
- Newtonsoft.Json.Linq.JObject jobject = (Newtonsoft.Json.Linq.JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(model.Sconfig_Value);
- tb_AppUrlPath.Text = jobject.GetValue("AppUrlPath").ToString();
- tb_AppID.Text = jobject.GetValue("AppEnId").ToString();
- }
- catch
- {
- }
-
- }
- else
- {
- model = new Model.Model_ErpSystemConfigure()
- {
- Sconfig_Code = "AppInterface",
- Sconfig_Name = "App接口配置",
- Sconfig_IsEnabled = true,
- Sconfig_Remark = "App接口配置",
- Sconfig_Order = 1,
- Sconfig_Type = "System",
- Sconfig_CreateDatetime = DateTime.Now
- };
- }*/
- }
- /// <summary>
- /// 确定保存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btn_OK_Click(object sender, EventArgs e)
- {
- /* dynamic dyObject = new System.Dynamic.ExpandoObject();
- dyObject.AppUrlPath=tb_AppUrlPath.Text;
- dyObject.AppEnId = tb_AppID.Text;
- model.Sconfig_Value = Newtonsoft.Json.JsonConvert.SerializeObject(dyObject);
- if(model.ID>0)
- {
- config.Update(model);
- }
- else
- {
- config.Add(model);
- }*/
- config.UpdateAPPInterface(tb_AppUrlPath.Text, tb_AppID.Text);
- MessageBoxCustom.Show("保存成功!");
- this.Close();
- }
- }
- }
|