本文整理汇总了C#中OpenMiracle.BLL.SettingsBll.SettingsToCopyViewAll方法的典型用法代码示例。如果您正苦于以下问题:C# SettingsBll.SettingsToCopyViewAll方法的具体用法?C# SettingsBll.SettingsToCopyViewAll怎么用?C# SettingsBll.SettingsToCopyViewAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenMiracle.BLL.SettingsBll
的用法示例。
在下文中一共展示了SettingsBll.SettingsToCopyViewAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillDefaultSettings
/// <summary>
/// RESET DATA FROM TABLE SETTINGSCOPY
/// </summary>
public void FillDefaultSettings()
{
SettingsBll BllSettings = new SettingsBll();
List<DataTable> listObj = new List<DataTable>();
try
{
listObj = BllSettings.SettingsToCopyViewAll();
foreach (Control ctrl in this.Controls)
{
if (ctrl is CheckBox)
{
CheckBox cb = (CheckBox)ctrl;
strControlls = cb.Text.Replace(" ", string.Empty);
foreach (DataRow dr in listObj[0].Rows)
{
if (dr["settingsName"].ToString() == strControlls)
{
if (strControlls == "AllowGoDown")
{
if (dr["status"].ToString() == "Yes")
{
cb.Checked = true;
if (BllSettings.SettingsStatusCheck("AllowRack") == "Yes")
{
cbxAllowRack.Checked = true;
}
else
{
cbxAllowRack.Checked = false;
}
}
else if (dr["status"].ToString() == "No")
{
cb.Checked = false;
cbxAllowRack.Visible = false;
cbxAllowRack.Checked = false;
}
}
else if (strControlls == "AddConfirmationFor")
{
if (dr["status"].ToString() == "Yes")
{
cb.Checked = true;
foreach (Control c in this.Controls)
{
if (c is CheckBox)
{
CheckBox cbx = (CheckBox)c;
string str = cbx.Text.Replace(" ", string.Empty);
if (str == "Add" || str == "Edit" || str == "Delete" || str == "Close")
{
foreach (DataRow dr1 in listObj[0].Rows)
{
if (dr1["settingsName"].ToString() == str)
{
if (dr1["status"].ToString() == "Yes")
{
cbx.Checked = true;
}
else if (dr1["status"].ToString() == "No")
{
cbx.Checked = false;
}
}
}
}
}
}
}
else
{
cb.Checked = false;
cbxAdd.Visible = false;
cbxDelete.Visible = false;
cbxEdit.Visible = false;
cbxClose.Visible = false;
}
}
else
{
if (dr["status"].ToString() == "Yes")
{
cb.Checked = true;
}
else if (dr["status"].ToString() == "No")
{
cb.Checked = false;
}
}
}
//.........这里部分代码省略.........