Example #1
0
 public void SaveItem()
 {
     string _positionname = Parameters["ppositionname"];
     string _positiondept = Parameters["ppositiondept"];
     string _positiontype = Parameters["ppositiontype"];
     string _positiongendor = Parameters["ppositiongendor"];
     string _positionnumber = Parameters["ppositionnumber"];
     string _positionbegindate = Parameters["pbegindate"];
     string _positionenddate = Parameters["penddate"];
     string _backcontent = Parameters["pbackcontent"];
     string _content = Parameters["pcontent"];
     string _order = Parameters["porder"];
     string positionid = Parameters["id"];
     PortalPosition item = new PortalPosition();
     PortalPositionBiz biz = new PortalPositionBiz();
     item.FPositionId = Convert.ToInt64(positionid);
     item.FPositionName = _positionname;
     item.FPositionDept = _positiondept;
     item.FPositionType = _positiontype;
     item.FPositionGendor = _positiongendor;
     item.FPositionNum = Convert.ToInt32(_positionnumber);
     item.FBeginDate = Convert.ToDateTime(_positionbegindate);
     item.FEndDate = Convert.ToDateTime(_positionenddate);
     item.FBackContent = _backcontent;
     item.FPositionContent = _content;
     item.FPositionOrder = Convert.ToInt32(_order);
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.Update(item, out ErrInfo);
     Response.Write(ErrInfo.ToJson());
 }
 public void DelPosition()
 {
     string _parm = Parameters["pparm"];
     PortalPositionBiz biz = new PortalPositionBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.Delete(_parm, out ErrInfo);
     Response.Write(ErrInfo.ToJson());
 }
 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<PortalPosition> lists = new List<PortalPosition>();
     PortalPositionBiz biz = new PortalPositionBiz();
     string _searchtext = _searchcontent;
     string wheresql = "";
     if (!string.IsNullOrEmpty(_searchtext))
     {
         wheresql += "(FPositionName like '%" + _searchtext + "%')";
     }
     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);
 }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string positionid = Parameters["id"];
            PortalPosition item = new PortalPosition();
            PortalPositionBiz biz = new PortalPositionBiz();
            item = biz.Select(positionid);
            if (item != null)
            {
                positionname = item.FPositionName;
                positiondept = item.FPositionDept;
                positiontype = item.FPositionType;
                positionnum = item.FPositionNum.ToString();
                positionbegindate = item.FBeginDateStr;
                positionenddate = item.FEndDateStr;
                bakcontent = item.FBackContent;
                content = item.FPositionContent;
                order = item.FPositionOrder.ToString();

            }
        }