예제 #1
0
 /// <summary>
 /// 初始化
 /// </summary>
 public BaseDao(int SId, int PId, string cnKey)
 {
     ia = DBAccessLayer.DBFactory.GetDBAccess(DBAccessLayer.DBAccessType.SQL, cnKey);
     string strSql = string.Format("select * from Sys_TreeList Where SysID = {0} and PermissionID={1}", SId, PId);
     Sys.TreeListDao dao = new Sys.TreeListDao();
     SysModel = dao.GetModel(SId, PId);
 }
예제 #2
0
 //string strTbName
 /// <summary>
 /// ��l��
 /// </summary>
 public PermissionDao(string FormID, string cnKey)
 {
     this.cnKey = cnKey;
     ia = DBAccessLayer.DBFactory.GetDBAccess(DBAccessLayer.DBAccessType.SQL, cnKey);
     string strSql = string.Format("select * from Sys_TreeList Where FormID = '{0}'", FormID);
     Sys.TreeListDao dao = new Sys.TreeListDao();
     SysModel = dao.GetModel(FormID);
 }
예제 #3
0
 //string strTbName
 /// <summary>
 /// 初始化
 /// </summary>
 public BaseDao(string FormID)
 {
     this.cnKey = "";
     ia = DBAccessLayer.DBFactory.GetDBAccess();
     string strSql = string.Format("select * from Sys_TreeList Where FormID = '{0}'", FormID);
     Sys.TreeListDao dao = new Sys.TreeListDao();
     SysModel = dao.GetModel(FormID);
 }
예제 #4
0
 //string strTbName
 /// <summary>
 /// ��l��
 /// </summary>
 public RoleDao(string FormID, string cnKey)
 {
     this.cnKey = cnKey;
     ia = DBAccessLayer.DBFactory.GetDBAccess(DBAccessLayer.DBAccessType.SQL, cnKey);
     string strSql = string.Format("select * from Sys_TreeList Where FormID = '{0}'", FormID);
     Sys.TreeListDao dao = new Sys.TreeListDao();
     SysModel = dao.GetModel(FormID);
     tf = new TableFieldInfo(SysModel.TableName, this.cnKey);
 }
예제 #5
0
        public CheckDao(string FormID,string cnKey)
        {
            ia = DBAccessLayer.DBFactory.GetDBAccess(DBAccessLayer.DBAccessType.SQL, "");
            ea = DBAccessLayer.DBFactory.GetDBAccess(DBAccessLayer.DBAccessType.SQL, cnKey);

            this.cnKey = cnKey;
            Sys.TreeListDao dao = new Sys.TreeListDao();
            SysModel = dao.GetModel(FormID);
        }
예제 #6
0
        /// <summary>
        /// 得到sys_TreeList數據實體
        /// </summary>
        /// <param name="row">row</param>
        /// <returns>com_departmentInfo</returns>
        public Js.Model.Sys.TreeListInfo GetModel(string FormID)
        {
            string strSql = string.Format("select * from Sys_TreeList Where FormID = '{0}'", FormID);

            DataTable dt = ia.ExecuteDataSetSql(strSql).Tables[0];
            Js.Model.Sys.TreeListInfo model = new Js.Model.Sys.TreeListInfo();
            if (dt.Rows.Count != 0)
            {
                model.FormID = dt.Rows[0]["FormID"].ToString();
                model.SysID = byte.Parse(dt.Rows[0]["SysID"].ToString());
                model.NodeID = int.Parse(dt.Rows[0]["NodeID"].ToString());
                model.Text = dt.Rows[0]["Text"].ToString();
                model.Text_cn = dt.Rows[0]["Text_cn"].ToString();
                model.Text_en = dt.Rows[0]["Text_en"].ToString();
                model.ParentID = int.Parse(dt.Rows[0]["ParentID"].ToString());
                model.Location = dt.Rows[0]["Location"].ToString();
                model.Url = dt.Rows[0]["Url"].ToString();
                model.PermissionID = int.Parse(dt.Rows[0]["PermissionID"].ToString());
                model.ImageUrl = dt.Rows[0]["ImageUrl"].ToString();
                model.Precondition = dt.Rows[0]["Precondition"].ToString();
                model.PrintPrefix = dt.Rows[0]["PrintPrefix"].ToString();
                model.IsUsedView = dt.Rows[0]["IsUsedView"].ToString();
                model.ShowVersion = dt.Rows[0]["ShowVersion"].ToString();
                model.TableName = dt.Rows[0]["TableName"].ToString();
                model.KeyField = dt.Rows[0]["KeyField"].ToString();
                model.ViewName = dt.Rows[0]["ViewName"].ToString();
                model.OrderField = dt.Rows[0]["OrderField"].ToString();
                model.BaseName = dt.Rows[0]["BaseName"].ToString();
                model.SelectSQL = dt.Rows[0]["SelectSQL"].ToString();
                model.strWhere = dt.Rows[0]["strWhere"].ToString();
                model.MainSubTbl = dt.Rows[0]["MainSubTbl"].ToString();
                model.Visible = bool.Parse(dt.Rows[0]["Visible"].ToString());
                model.AutoCodeName = dt.Rows[0]["AutoCodeName"].ToString();
            }
            return model;
        }