Beispiel #1
0
        /// <summary>
        /// 针对导出重写查询
        /// </summary>
        /// <param name="st"></param>
        /// <returns></returns>
        protected override MDataTable Select(GridConfig.SelectType st)
        {
            MDataTable dt;

            if (st.ToString() == "Export")
            {
                if (ObjName.Substring(0, 3).ToLower() == "vs_")
                {
                    string spName = ObjName.Substring(3);
                    string conn   = CrossDb.GetConn(ObjName);
                    dt = Select_SP(spName, conn);
                }
                else if (Query <string>("isCompany") == "1")
                {
                    string spName = "sp_SelectCompany";
                    string conn   = CrossDb.GetConn(ObjName);
                    dt = SelectList_SP(spName, conn);
                }
                else
                {
                    dt = base.Select(st);
                }
            }
            else
            {
                dt = base.Select(st);
            }
            return(dt);
        }
Beispiel #2
0
 /// <summary>
 /// 重写查询事件
 /// </summary>
 public override void GetList()
 {
     if (ObjName.Substring(0, 3).ToLower() == "vs_")
     {
         string spName = ObjName.Substring(3);
         string conn   = CrossDb.GetConn(ObjName);
         jsonResult = Select_SP(spName, conn).ToJson(true, false, true);
     }
     else if (Query <string>("isCompany") == "1")
     {
         string spName = "sp_SelectCompany";
         string conn   = CrossDb.GetConn(ObjName);
         jsonResult = SelectList_SP(spName, conn).ToJson(true, false, true);
     }
     else
     {
         base.GetList();
     }
 }