Exemple #1
0
        private void PageInit()
        {
            BLL.Content.ModelManage    bllModelManage = new KingTop.BLL.Content.ModelManage();
            KingTop.Model.SelectParams parms          = new KingTop.Model.SelectParams(); //传递参数类
            parms.S1 = "10";

            //绑定模型下拉列表
            ddlModelList.DataSource     = bllModelManage.GetList("ALL", parms);
            ddlModelList.DataTextField  = "title";
            ddlModelList.DataValueField = "ID";
            ddlModelList.DataBind();

            //如果用户操作为修改,则初始化绑定
            if (Action == "EDIT")
            {
                SelectParams selParams = new SelectParams();
                selParams.S1 = ID;
                DataTable dt = bllFiledGroup.GetList("ONE", selParams);
                if (dt != null && dt.Rows.Count > 0)
                {
                    txtName.Text               = dt.Rows[0]["Name"].ToString();
                    hidLogTitle.Value          = txtName.Text;
                    ddlModelList.SelectedValue = dt.Rows[0]["ModelId"].ToString();
                    IsEnable.Checked           = Convert.ToBoolean(dt.Rows[0]["IsEnable"]);
                }
                btnSave.Text = Utils.GetResourcesValue("Common", "Update");
                dt.Dispose();
            }
        }
Exemple #2
0
        public DataTable GetPendingAudi(KingTop.Model.SelectParams modelPrams)     //获得待审核的信息
        {
            DataTable dt    = dal.GetPendingAudi(modelPrams);
            int       m     = 0;
            DataTable newDt = new DataTable();      //分4列显示

            newDt.Columns.Add("ModelName");
            newDt.Columns.Add("Counter");
            newDt.Columns.Add("ModelName2");
            newDt.Columns.Add("Counter2");
            DataRow[] dr1  = dt.Select("ModelName<>''");
            int       rows = dr1.Length / 2 + dr1.Length % 2;

            for (int i = 0; i < rows; i++)
            {
                DataRow newRow = newDt.NewRow();
                newRow["ModelName"] = dr1[i]["ModelName"].ToString().Replace("模型", "");
                newRow["Counter"]   = dr1[i]["Counter"].ToString();
                newDt.Rows.Add(newRow);
            }
            m = 0;
            for (int j = rows; j < dr1.Length; j++)
            {
                newDt.Rows[m]["ModelName2"] = dr1[j]["ModelName"].ToString().Replace("模型", "");
                newDt.Rows[m]["Counter2"]   = dr1[j]["Counter"].ToString();
                m++;
            }

            return(newDt);
        }
Exemple #3
0
 public DataTable GetList(string tranType, KingTop.Model.SelectParams paramsModel)
 {
     return(dal.GetList(tranType, paramsModel));
 }