Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B_Admin badmin = new B_Admin();

            if (!this.Page.IsPostBack)
            {
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='DatalistProfile.aspx'>系统全库概况</a></li><li>修改说明</li>");
                if (!string.IsNullOrEmpty(Request["ID"]))
                {
                    mlist = dtlist.SelReturnModel(Convert.ToInt32(Request["ID"]));
                    this.TxtTableName.Text = mlist.TableName;
                    this.TxtTypeID.Value   = mlist.Type.ToString();
                    switch (mlist.Type.ToString())
                    {
                    case "0":
                        this.TxtType.Text = "系统表";
                        break;

                    case "1":
                        this.TxtType.Text = "自定义表";
                        break;

                    case "2":
                        this.TxtType.Text = "临时表";
                        break;

                    default:
                        this.TxtType.Text = "系统表";
                        break;
                    }
                    this.TxtExplain.Text = mlist.Explain;
                }
            }
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(Request["ID"]))
     {
         B_Admin badmin = new B_Admin();
         if (!badmin.GetAdminLogin().IsSuperAdmin())
         {
             function.WriteErrMsg("只有超级管理员才有权限访该页!!");
         }
         B_DataList bll       = new B_DataList();
         M_DataList mod       = bll.SelReturnModel(Convert.ToInt32(Request["ID"]));
         string     tableinfo = "";
         string     tablelink = "";
         if (Request["type"] == "data")
         {
             RunSelsql2(mod.TableName);
             tableinfo = "表数据";
             tablelink = "<a href='DataListView.aspx?ID=" + Request.QueryString["ID"] + "' target='_self' >[表结构]</a>";
         }
         else
         {
             RunSelsql(mod.TableName);
             tableinfo = "表结构";
             tablelink = "<a href='DataListView.aspx?ID=" + Request.QueryString["ID"] + "&type=data' target='_self' >[表数据]</a>";
         }
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='DatalistProfile.aspx'>扩展功能</a></li><li><a href='RunSql.aspx'>开发中心</a></li><li><a href='DatalistProfile.aspx'>系统全库概况</a></li><li>" + tableinfo + tablelink + "</li>");
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 根据ID查询一条记录
 /// </summary>
 public M_DataList SelReturnModel(int ID)
 {
     using (SqlDataReader reader = Sql.SelReturnReader(strTableName, PK, ID))
     {
         if (reader.Read())
         {
             M_DataList model = initMod.GetModelFromReader(reader);
             return(model);
         }
         else
         {
             return(null);
         }
     }
 }
Exemplo n.º 4
0
 public int insert(M_DataList model)
 {
     return(Sql.insert(strTableName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 根据ID更新
 /// </summary>
 public bool UpdateByID(M_DataList model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model)));
 }
Exemplo n.º 6
0
 public bool Update_Author_ByID(M_DataList model)
 {
     return(UpdateByID(model));
 }
Exemplo n.º 7
0
 public int insert(M_DataList model)
 {
     return(DBCenter.Insert(model));
 }
Exemplo n.º 8
0
 /// <summary>
 /// 根据ID更新
 /// </summary>
 public bool UpdateByID(M_DataList model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }