本文整理汇总了C#中Config.ReadConfig方法的典型用法代码示例。如果您正苦于以下问题:C# Config.ReadConfig方法的具体用法?C# Config.ReadConfig怎么用?C# Config.ReadConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Config
的用法示例。
在下文中一共展示了Config.ReadConfig方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Button1_Click
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Config config = new Config();
config.DefaultInterval = Convert.ToInt32(this.txtDefaultTime.Text);
config.MinInterval = Convert.ToInt32(this.txtMinTime.Value);
config.MaxSampleCondition = Convert.ToInt32(this.txtMaxMount.Value);
config.DefaultTestDuration = Convert.ToInt32(this.txtDefaultSYTime.Value);
config.MaxTestDuration = Convert.ToInt32(this.txtMaxSYTime.Value);
DataTable dt = config.ReadConfig();
if (dt != null && dt.Rows.Count > 0)
{
config.ID_KEY = Convert.ToInt32(dt.Rows[0][0].ToString());
config.EditConfig(config);
}
else
{
config.InsertConfig();
}
Response.Write("<script language='javascript'> alert('保存成功!') </script>");
}
catch (Exception ex)
{
return;
}
}
示例2: ReadDefaultConfig
public void ReadDefaultConfig()
{
Config config = new Config();
DataTable dt = config.ReadConfig();
if (dt != null && dt.Rows.Count > 0)
{
this.txtDefaultTime.Text = dt.Rows[0][1].ToString();
this.txtMinTime.Value = dt.Rows[0][2].ToString();
this.txtMaxMount.Value = dt.Rows[0][3].ToString();
this.txtDefaultSYTime.Value = dt.Rows[0][4].ToString();
this.txtMaxSYTime.Value = dt.Rows[0][5].ToString();
}
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindCompany();
this.Timer1.Enabled = false;
//BindReportName();
this.Session["bl"] = 0;
Bussiness.Config config = new Config();
DataTable dt = config.ReadConfig();
if (dt != null && dt.Rows.Count > 0)
{
this.hddMinSplitTime.Value = dt.Rows[0][2].ToString();
this.txtSplitTime.Value = dt.Rows[0][2].ToString();
this.hddMaxTime.Value = dt.Rows[0][5].ToString();
this.txtSYTime.Value = dt.Rows[0][4].ToString();
this.calSYStartTime.Text = DateTime.Now.ToString();
}
Bussiness.ThermalTestReport report = new ThermalTestReport();
if (report.IsDoingExpriment())
this.btnStartEnd.Enabled = false;
this.btnView.Enabled = false;
this.btnView.Attributes.Add("onclick", "linkExpriment()");
}
}