北京安通林JIS系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.9 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using Stone.Entity;
using Gm_WMS.DataAccess.DataService;
namespace Stone.WinBiz.BasicData
{
public class F_Appconfig : F_Base
{
public F_Appconfig()
{
this.type = "Appconfig";
this.name = "系统管理_参数设置";
this.entity = new Entity_t_Sys_Appconfig();
}
public override void BindPageData(string strWhere)
{
strWhere = "(" + strWhere + ") and [Code]<>'U8'";
base.BindPageData(strWhere);
}
public override void GetView(DataGridView dgv)
{
base.GetView(dgv);
dgv.Columns["Code"].HeaderText = "代码";
dgv.Columns["Name"].HeaderText = "名称";
dgv.Columns["Value"].HeaderText = "值";
dgv.Columns["Memo"].HeaderText = "备注";
}
public override void InputData(DataSet dsData, LocalDBService db)
{
}
public static string GetValue(string Code)
{
string ret = "";
Entity_t_Sys_Appconfig t_Sys_Appconfig = new Entity_t_Sys_Appconfig();
DataTable dtAppconfig = t_Sys_Appconfig.GetData("[Code]='" + Code + "'").Tables[0];
if (dtAppconfig.Rows.Count > 0)
{
ret = dtAppconfig.Rows[0]["Value"].ToString();
}
return ret;
}
public static string GetName(string Value)
{
string ret = "";
Entity_t_Sys_Appconfig t_Sys_Appconfig = new Entity_t_Sys_Appconfig();
DataTable dtAppconfig = t_Sys_Appconfig.GetData("[Value]='" + Value + "'").Tables[0];
if (dtAppconfig.Rows.Count > 0)
{
ret = dtAppconfig.Rows[0]["Code"].ToString();
}
return ret;
}
}
}