81 lines
2.6 KiB
C#
81 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace VRS.Management.VSAT
|
|
{
|
|
public partial class ModeManage : BasePage
|
|
{
|
|
DataService.BLL.admin_config bllConfig = new DataService.BLL.admin_config();
|
|
|
|
protected override void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
Dataload();
|
|
}
|
|
}
|
|
|
|
protected void Dataload()
|
|
{
|
|
var configModel = GetSystemConfig(ConfigurationManager.AppSettings["SystemName"].ToString());
|
|
if (configModel != null)
|
|
{
|
|
hideMode.Value = configModel.is_examine == 0 ? "关" : "开";
|
|
hideModeTog.Value = configModel.examine_type == 0 ? "训练" : "考核";
|
|
}
|
|
}
|
|
|
|
protected void btn_Off_Click(object sender, EventArgs e)
|
|
{
|
|
var configModel = GetSystemConfig(ConfigurationManager.AppSettings["SystemName"].ToString());
|
|
if (configModel != null)
|
|
{
|
|
if (configModel.examine_type == 1)
|
|
{
|
|
configModel.examine_end_time = DateTime.Now;
|
|
}
|
|
configModel.is_examine = 0;
|
|
bllConfig.Update(configModel);
|
|
}
|
|
}
|
|
|
|
protected void btn_On_Click(object sender, EventArgs e)
|
|
{
|
|
var configModel = GetSystemConfig(ConfigurationManager.AppSettings["SystemName"].ToString());
|
|
if (configModel != null)
|
|
{
|
|
configModel.is_examine = 1;
|
|
bllConfig.Update(configModel);
|
|
}
|
|
}
|
|
|
|
protected void btn_Prc_Click(object sender, EventArgs e)
|
|
{
|
|
var configModel = GetSystemConfig(ConfigurationManager.AppSettings["SystemName"].ToString());
|
|
if (configModel != null)
|
|
{
|
|
if (configModel.examine_type == 1)
|
|
{
|
|
configModel.examine_end_time = DateTime.Now;
|
|
}
|
|
configModel.examine_type = 0;
|
|
bllConfig.Update(configModel);
|
|
}
|
|
}
|
|
|
|
protected void btn_Exa_Click(object sender, EventArgs e)
|
|
{
|
|
var configModel = GetSystemConfig(ConfigurationManager.AppSettings["SystemName"].ToString());
|
|
if (configModel != null)
|
|
{
|
|
configModel.examine_type = 1;
|
|
bllConfig.Update(configModel);
|
|
}
|
|
}
|
|
}
|
|
} |