当前位置: 首页>>代码示例>>C#>>正文


C# SettingsBll.SettingsViewAll方法代码示例

本文整理汇总了C#中OpenMiracle.BLL.SettingsBll.SettingsViewAll方法的典型用法代码示例。如果您正苦于以下问题:C# SettingsBll.SettingsViewAll方法的具体用法?C# SettingsBll.SettingsViewAll怎么用?C# SettingsBll.SettingsViewAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenMiracle.BLL.SettingsBll的用法示例。


在下文中一共展示了SettingsBll.SettingsViewAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FillSettingsOfCurrenctBranch

        /// <summary>
        /// Function to Fill the Settings Of Currenct Company
        /// </summary>
        public void FillSettingsOfCurrenctBranch()
        {
            SettingsBll BllSettings = new SettingsBll();
            List<DataTable> listObj = new   List<DataTable>();
            try
            {
                listObj = BllSettings.SettingsViewAll();
                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;
                                    }
                                }
                            }

//.........这里部分代码省略.........
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:101,代码来源:frmSettings.cs

示例2: InitialSettings

 /// <summary>
 /// Function for check settings
 /// </summary>
 public void InitialSettings()
 {
     try
     {
         SettingsBll BllSettings = new SettingsBll();
         SettingsInfo info = new SettingsInfo();
         List<DataTable> listObj = new List<DataTable>();
         listObj = BllSettings.SettingsViewAll();
         if (listObj[0].Rows.Count > 0)
         {
             foreach (DataRow item in listObj[0].Rows)
             {
                 info.SettingsName = item["settingsName"].ToString();
                 info.Status = item["status"].ToString();
                 if (info.SettingsName == "AllowBatch" && info.Status == "Yes")
                 {
                     cmbAllowBatch.Enabled = true;
                 }
                 if (info.SettingsName == "AllowBatch" && info.Status == "No")
                 {
                     cmbAllowBatch.Enabled = false;
                 }
                 if (info.SettingsName == "AllowSize" && info.Status == "Yes")
                 {
                     cmbSize.Enabled = true;
                     btnSizeAdd.Enabled = true;
                 }
                 if (info.SettingsName == "AllowSize" && info.Status == "No")
                 {
                     cmbSize.Enabled = false;
                     btnSizeAdd.Enabled = false;
                 }
                 if (info.SettingsName == "AllowModelNo" && info.Status == "Yes")
                 {
                     cmbModalNo.Enabled = true;
                     btnModalNo.Enabled = true;
                 }
                 if (info.SettingsName == "AllowModelNo" && info.Status == "No")
                 {
                     cmbModalNo.Enabled = false;
                     btnModalNo.Enabled = false;
                 }
                 if (info.SettingsName == "AllowGodown" && info.Status == "Yes")
                 {
                     cmbDefaultGodown.Enabled = true;
                     btnDefaultGodownAdd.Enabled = true;
                     dgvProductCreation.Columns["dgvcmbtgodown"].Visible = true;
                 }
                 if (info.SettingsName == "AllowGodown" && info.Status == "No")
                 {
                     cmbDefaultGodown.Enabled = false;
                     btnDefaultGodownAdd.Enabled = false;
                     dgvProductCreation.Columns["dgvcmbtgodown"].Visible = false;
                 }
                 if (info.SettingsName == "AllowRack" && info.Status == "Yes")
                 {
                     cmbDefaultRack.Enabled = true;
                     btnDefaultAdd.Enabled = true;
                     dgvProductCreation.Columns["dgvcmbrack"].Visible = true;
                 }
                 if (info.SettingsName == "AllowRack" && info.Status == "No")
                 {
                     cmbDefaultRack.Enabled = false;
                     btnDefaultAdd.Enabled = false;
                     dgvProductCreation.Columns["dgvcmbrack"].Visible = false;
                 }
                 if (info.SettingsName == "Tax" && info.Status == "No")
                 {
                     cmbTax.Enabled = false;
                     btnTaxAdd.Enabled = false;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PC:74" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:82,代码来源:frmProductCreation.cs


注:本文中的OpenMiracle.BLL.SettingsBll.SettingsViewAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。