Exemplo n.º 1
0
 public void DelData()
 {
     string idlist = Parameters["pparm"];
     OEContentClassBiz biz = new OEContentClassBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.Delete(idlist, out ErrInfo);
     Response.Write(ErrInfo.ToJson());
 }
Exemplo n.º 2
0
 public void GetGridData()
 {
     string _searchcontent = "";
     string _sortname = "";
     string _sortdirection = "";
     string _pagenumber = "";
     string _pagesize = "";
     _searchcontent = Parameters["psearchcontent"];
     _sortname = Parameters["psortname"];
     if (!string.IsNullOrEmpty(_sortname))
     {
         sSortName = _sortname;
     }
     _sortdirection = Parameters["psortdirection"];
     if (!string.IsNullOrEmpty(_sortdirection))
     {
         sSortDirection = _sortdirection;
     }
     _pagenumber = Parameters["ppagenumber"];
     if (!string.IsNullOrEmpty(_pagenumber))
     {
         sPageIndex = Convert.ToInt32(_pagenumber);
     }
     _pagesize = Parameters["ppagesize"];
     if (!string.IsNullOrEmpty(_pagesize))
     {
         sPageSize = Convert.ToInt32(_pagesize);
     }
     List<OEQuestionBank> lists = new List<OEQuestionBank>();
     OEQuestionBankBiz biz = new OEQuestionBankBiz();
     string _searchtext = _searchcontent;
     string wheresql = "";
     string _searchclassid = Parameters["psearchclassid"];
     OEContentClassBiz ccbiz = new OEContentClassBiz();
     string _idlist = "";
     ccbiz.GetChildrenIdList(_searchclassid, ref _idlist);
     wheresql = "( FContentClassId in (" + _idlist + ")) ";
     if (!string.IsNullOrEmpty(_searchtext))
     {
         //difine wheresql
         //for example:wheresql = " (FDepartmentName like '%" + _searchtext + "%') or (FDepartmentCode like '%" + _searchtext + "%')";
         wheresql += " and (FQBankName like '%" + _searchtext + "%')";
     }
     else
     {
         wheresql += " and (1=1)";
     }
     NameValueCollection where = new NameValueCollection();
     where.Add("condition", wheresql);
     NameValueCollection orderby = new NameValueCollection();
     orderby.Add(_sortname, _sortdirection);
     Int32 totalcount = 0;
     lists = biz.Select(where, orderby, Convert.ToInt32(sPageIndex), Convert.ToInt32(sPageSize), out totalcount);
     string datasource = Utils.GetRepeaterDatasource(lists, sPageIndex, sPageSize, totalcount);
     Response.Write(datasource);
 }
Exemplo n.º 3
0
 public void GetBankList()
 {
     string pcontentclassid = Parameters["pcontentclassid"];
     OEContentClassBiz ccbiz = new OEContentClassBiz();
     string ccidlist = "";
     ccbiz.GetChildrenIdList(pcontentclassid, ref ccidlist);
     List<OEQuestionBank> lists = new List<OEQuestionBank>();
     OEQuestionBankBiz biz = new OEQuestionBankBiz();
     NameValueCollection where = new NameValueCollection();
     where.Add("condition", "(FQBankStatus = '1') and (FContentClassId in (" + ccidlist + "))");
     lists = biz.Select(where);
     Response.Write(Utils.ConvertToJson(lists));
 }
Exemplo n.º 4
0
 public void GetQuestionBank()
 {
     string _classid = Parameters["pclassid"];
     OEContentClassBiz biz = new OEContentClassBiz();
     string _idlist = "";
     biz.GetChildrenIdList(_classid, ref _idlist);
     OEQuestionBankBiz QBBiz = new OEQuestionBankBiz();
     NameValueCollection where = new NameValueCollection();
     where.Add("condition", "FContentClassId in (" + _idlist + ")");
     NameValueCollection orderby = new NameValueCollection();
     orderby.Add("FQBankCode", "asc");
     List<OEQuestionBank> lists = new List<OEQuestionBank>();
     lists = QBBiz.Select(where, orderby);
     Response.Write(Utils.ConvertToJson(lists));
 }
Exemplo n.º 5
0
 public void GetItem()
 {
     string _id = Parameters["pid"];
     OEContentClass item = new OEContentClass();
     OEContentClassBiz biz = new OEContentClassBiz();
     item = biz.Select(_id);
     if (item == null)
     {
         Response.Write("");
     }
     else
     {
         Response.Write(item.ToJson());
     }
 }
Exemplo n.º 6
0
        public void SaveItem()
        {
            string _FContentClassId = Parameters["pFContentClassId"];
            // other paramters fill here
            string _FContentClassCode = Parameters["pFContentClassCode"];
            string _FContentClassName = Parameters["pFContentClassName"];
            string _FContentClassContent = Parameters["pFContentClassContent"];
            string _FIconPath = Parameters["pFIconPath"];
            string _FParentId = Parameters["pFParentId"];

            OEContentClass item = new OEContentClass();
            item.FContentClassId = string.IsNullOrEmpty(_FContentClassId) ? 0 : Convert.ToInt64(_FContentClassId);
            item.FContentClassCode = _FContentClassCode;
            item.FContentClassName = _FContentClassName;
            item.FContentClassContent = _FContentClassContent;
            item.FIconPath = _FIconPath;
            item.FParentId = string.IsNullOrEmpty(_FParentId) ? 0 : Convert.ToInt64(_FParentId);
            OEContentClassBiz biz = new OEContentClassBiz();
            ErrorEntity ErrInfo = new ErrorEntity();
            if (item.FContentClassId == 0)
            {
                biz.Insert(item, out ErrInfo);
            }
            else
            {
                biz.Update(item, out ErrInfo);
            }
            Response.Write(ErrInfo.ToJson());
        }
Exemplo n.º 7
0
 public void GetNowParent()
 {
     string _id = Parameters["pid"];
     OEContentClass item = new OEContentClass();
     OEContentClassBiz biz = new OEContentClassBiz();
     item = biz.Select(_id);
     Response.Write(item.FParentId.ToString());
 }
Exemplo n.º 8
0
 public List<OEContentClassTree> Select()
 {
     OEContentClassBiz biz = new OEContentClassBiz();
     return Select(0,biz.Select());
 }