コード例 #1
0
        public ActionResult WriteBackResult(WriteBackResultQueryForm form, EasyUIGridSetting gridSetting)
        {
            FCWebserviceBll bll    = new FCWebserviceBll();
            EasyUIGridModel result = bll.GetWriteBackResult(form, gridSetting);

            return(Content(result.ToJson(), "application/json"));
        }
コード例 #2
0
        public EasyUIGridModel GetWBInfoResult(WBQueryForm form)
        {
            //string cfwbService = ConfigurationManager.AppSettings["FWCFAddress"].ToString();
            BDCSrvSoap     soap    = new BDCSrvSoapClient();
            DataSet        ds      = soap.SPF_WFZMCX(form.QLRXM, form.ZJHM, form.Address);
            IList <WBInfo> wbinfos = new List <WBInfo>();

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    WBInfo w = new WBInfo();
                    w.HouseID    = ds.Tables[0].Rows[i]["HouseID"].ToString();
                    w.BuildingID = ds.Tables[0].Rows[i]["BuildingID"].ToString();
                    w.ZL         = ds.Tables[0].Rows[i]["ZL"].ToString();
                    w.QLRMC      = ds.Tables[0].Rows[i]["QLRMC"].ToString();
                    w.ZJHM       = ds.Tables[0].Rows[i]["ZJHM"].ToString();
                    w.JZMJ       = Convert.ToDouble(ds.Tables[0].Rows[i]["JZMJ"]);
                    w.ContractNO = ds.Tables[0].Rows[i]["ContractNO"].ToString();
                    w.SignDate   = Convert.ToDateTime(ds.Tables[0].Rows[i]["SignDate"]);
                    wbinfos.Add(w);
                }
            }
            EasyUIGridModel ret = new EasyUIGridModel(0, wbinfos.Count, wbinfos);

            return(ret);
        }
コード例 #3
0
        public virtual LJsonResult EasyUIAjaxGetPage(int?page, int?rows)
        {
            /*
             * 1、easyui-datagrid 分页接收参数
             * page 接受客户端的页码,对应的就是用户选择或输入的pageNumber(按照上图的例子,用户点了下一页,传到服务器端就是2)
             * rows 接受客户端的每页记录数,对应的就是pageSize  (用户在下拉列表选择每页显示30条记录,传到服务器就是30)
             */
            if (!page.HasValue)
            {
                page = 1;
            }
            if (!rows.HasValue)
            {
                rows = 10;
            }
            int pageNumber = page.Value;
            int pageSize   = rows.Value;

            var modelList = this.Repository <TAggregateRoot>().FindAll(p => p.ID, SortOrder.Descending, pageNumber, pageSize);

            var gridModel = new EasyUIGridModel <TAggregateRoot>();

            if (modelList != null)
            {
                gridModel.total = modelList.Count;
                gridModel.rows  = modelList.Data.ToList <TAggregateRoot>();
            }
            var json = new LJsonResult();

            json.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            json.Data = gridModel;

            return(json);
        }
コード例 #4
0
 /// <summary>
 /// 根据
 /// </summary>
 /// <param name="HouseIds"></param>
 /// <returns></returns>
 public EasyUIGridModel GetWBInfoByHouseIds(IList <string> HouseIds)
 {
     if (HouseIds.Count > 0)
     {
         BDCSrvSoap soap = new BDCSrvSoapClient();
         IList <WBInfoForAHouse> wbinfos = new List <WBInfoForAHouse>();
         foreach (string hid in HouseIds)
         {
             string  paramstring = "HouseID=" + hid;
             DataSet ds          = soap.SPF_FC_FWQK(paramstring);
             if (ds != null && ds.Tables[0].Rows.Count > 0)
             {
                 WBInfoForAHouse w = new WBInfoForAHouse();
                 w.HID  = ds.Tables[0].Rows[0]["HID"].ToString();
                 w.XMMC = ds.Tables[0].Rows[0]["XMMC"].ToString();
                 w.LPMC = ds.Tables[0].Rows[0]["LPMC"].ToString();
                 w.DYH  = ds.Tables[0].Rows[0]["DYH"].ToString();
                 w.FJH  = ds.Tables[0].Rows[0]["FJH"].ToString();
                 w.JZMJ = ds.Tables[0].Rows[0]["JZMJ"].ToString();
                 w.FWZT = ds.Tables[0].Rows[0]["FWZT"].ToString();
                 w.CFZT = ds.Tables[0].Rows[0]["CFZT"].ToString();
                 w.DYZT = ds.Tables[0].Rows[0]["DYZT"].ToString();
                 w.ZXZT = ds.Tables[0].Rows[0]["ZXZT"].ToString();
                 if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
                 {
                     w.MCList   = new List <string>();
                     w.ZJLXList = new List <string>();
                     w.ZJHMList = new List <string>();
                     w.LXDHList = new List <string>();
                     w.LXDZList = new List <string>();
                     for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                     {
                         w.MCList.Add(ds.Tables[1].Rows[i]["MC"].ToString());
                         w.ZJLXList.Add(ds.Tables[1].Rows[i]["ZJLX"].ToString());
                         w.ZJHMList.Add(ds.Tables[1].Rows[i]["ZJHM"].ToString());
                         w.LXDZList.Add(ds.Tables[1].Rows[i]["LXDZ"].ToString());
                     }
                 }
                 wbinfos.Add(w);
             }
             else
             {
                 wbinfos.Add(new WBInfoForAHouse {
                     XMMC = "网备中无此房屋"
                 });
             }
         }
         EasyUIGridModel ret = new EasyUIGridModel(0, wbinfos.Count, wbinfos);
         return(ret);
     }
     else
     {
         return(null);
     }
 }
コード例 #5
0
        public ActionResult GetAttachLst(FileUploadQueryForm form, EasyUIGridSetting gridSetting)
        {
            if (form == null || string.IsNullOrEmpty(form.Slbh))
            {
                return(Content("[]", "application/json"));
            }
            BDCExtendBLL    bll    = new BDCExtendBLL();
            EasyUIGridModel result = bll.GetAttachLst(form, gridSetting);

            return(Content(result.ToJson(), "application/json"));
        }
コード例 #6
0
        public EasyUIGridModel GetAttachLst(FileUploadQueryForm form, EasyUIGridSetting gridSetting)
        {
            string  sql                 = string.Format(@"SELECT CID,PNODE as SLBH,CNAME,to_char(CREATEDATE,'yy-mm-dd hh24:mi:ss') CREATEDATE 
 FROM (Select ROWNUM AS ROWNO, T.*
      from (select CID,PNODE,CNAME,CREATEDATE from WFM_ATTACHLST where {0}) T 
      WHERE ROWNUM <= {1}) TABLE_ALIAS
WHERE TABLE_ALIAS.ROWNO >  {2}", form.GetWhere(), gridSetting.PageIndex * gridSetting.PageSize, (gridSetting.PageIndex - 1) * gridSetting.PageSize);
            string  connectStr          = ConfigurationManager.ConnectionStrings["bdcggkConnection"].ToString();
            DataSet ds                  = DBHelper.GetDataSet(connectStr, sql);
            TBToList <AttachModel> list = new TBToList <AttachModel>();
            IList <AttachModel>    tags = list.ConvertToModel(ds.Tables[0]);
            string          countSql    = string.Format("Select count(1) from WFM_ATTACHLST where {0}", form.GetWhere());
            int             count       = DBHelper.GetScalar(connectStr, countSql);
            EasyUIGridModel ret         = new EasyUIGridModel(gridSetting.PageIndex, count, tags);

            return(ret);
        }
コード例 #7
0
ファイル: FlowServices.cs プロジェクト: iraychen/LCLFramework
        /// <summary>
        /// 待我处理的工作
        /// </summary>
        private void MyTaskList()
        {
            var gridModel = new EasyUIGridModel<MyTaskListViewModel>();
            Result = new Result(true);
            try
            {
                var data = DbFactory.DBA.QueryDataTable(@"select t.ID as TaskID,t1.Name as TaskName,t2.Name as BillName,t3.Name as RoutName,t.State as TaskState,t2.State as ItemState,t2.AddDate from WFTaskList t
inner join WFActor t1 on t.Actor_ID=t1.ID
inner join WFItem t2 on t.Item_ID=t2.ID
inner join WFRout t3 on t1.Rout_ID=t3.ID");
                gridModel.rows = data.ToArray<MyTaskListViewModel>().ToList();
                gridModel.total = gridModel.rows.Count;
            }
            catch (Exception)
            {
                Result = new Result(false);
            }
            Result.DataObject = gridModel;
        }
コード例 #8
0
        /// <summary>
        /// 待我处理的工作
        /// </summary>
        private void MyTaskList()
        {
            var gridModel = new EasyUIGridModel <MyTaskListViewModel>();

            Result = new Result(true);
            try
            {
                var data = DbFactory.DBA.QueryDataTable(@"select t.ID as TaskID,t1.Name as TaskName,t2.Name as BillName,t3.Name as RoutName,t.State as TaskState,t2.State as ItemState,t2.AddDate from WFTaskList t
inner join WFActor t1 on t.Actor_ID=t1.ID
inner join WFItem t2 on t.Item_ID=t2.ID
inner join WFRout t3 on t1.Rout_ID=t3.ID");
                gridModel.rows  = data.ToArray <MyTaskListViewModel>().ToList();
                gridModel.total = gridModel.rows.Count;
            }
            catch (Exception)
            {
                Result = new Result(false);
            }
            Result.DataObject = gridModel;
        }
コード例 #9
0
        public EasyUIGridModel GetWriteBackResult(WriteBackResultQueryForm form, EasyUIGridSetting gridSetting)
        {
            string sql = string.Format(@"SELECT SLBH,DJLX,SFTS,PUSHDATA,PUSHDATE,PUSHRESULT,WBERRINFO,CGERRINFO,PID,ADDRESSTYPE 
 FROM (Select ROWNUM AS ROWNO, T.*
      from (select * from FC_SPFHX_TAG where {0}  order by pushdate desc) T 
      WHERE ROWNUM <= {1}) TABLE_ALIAS
WHERE TABLE_ALIAS.ROWNO >  {2} ", form.GetWhere(), gridSetting.PageIndex * gridSetting.PageSize, (gridSetting.PageIndex - 1) * gridSetting.PageSize, gridSetting.SortBy.PropertyName, gridSetting.SortBy.SortType);

            if (gridSetting.SortBy.PropertyName != "")
            {
                sql += " order by " + gridSetting.SortBy.PropertyName + " " + gridSetting.SortBy.SortType;
            }
            DataSet ds = DBHelper.GetDataSet(sql);
            TBToList <SPFHX_TAG> list = new TBToList <SPFHX_TAG>();
            IList <SPFHX_TAG>    tags = list.ConvertToModel(ds.Tables[0]);
            string          countSql  = string.Format("Select count(1) from FC_SPFHX_TAG where {0}", form.GetWhere());
            int             count     = DBHelper.GetScalar(countSql);
            EasyUIGridModel ret       = new EasyUIGridModel(gridSetting.PageIndex, count, tags);

            return(ret);
        }
コード例 #10
0
        public EasyUIGridModel GetWBCLFInfoByHouseIds(string slbh)
        {
            IList <WBCLFInfo> wbinfos = new List <WBCLFInfo>();

            FCWebServiceDal    dal         = new FCWebServiceDal();
            IList <XGZHAndQLR> xgzhAndQlrs = dal.GetFDJBInfo(slbh);

            foreach (XGZHAndQLR xgzhAndQlr in xgzhAndQlrs)
            {
                IList <string> qlrs = xgzhAndQlr.QLRS;

                if (qlrs.Count > 0)
                {
                    foreach (string qlr in qlrs)
                    {
                        IDictionary <string, string> paramss = new Dictionary <string, string>();
                        paramss["CQZH"] = xgzhAndQlr.XGZH;
                        paramss["SYQR"] = qlr;
                        FC_CLMMHT_WSData ht_Data = new FC_CLMMHT_WSData(CLMMHT_Webservice_Address, "2000");

                        string backDatas = ht_Data.GetWebServiceData(paramss, null);

                        var bdc = ht_Data.XMLParsing(backDatas);

                        if (bdc.data != null && bdc.data.dt != null && bdc.data.dt.Rows.Count > 0)
                        {
                            string htid  = bdc.data.dt.Rows[0]["HTID"].ToString().Trim();
                            string htbah = bdc.data.dt.Rows[0]["CLHTBAH"].ToString();

                            var    qlrBdc = GetQLR(htbah);
                            string yrwmc  = "";
                            string ywrno  = "";
                            if (qlrBdc.data != null && qlrBdc.data.dt != null && qlrBdc.data.dt.Rows.Count > 0)
                            {
                                foreach (DataRow row in qlrBdc.data.dt.Rows)
                                {
                                    if (row["XGRLX"].ToString() == "1")
                                    {
                                        if (yrwmc == "")
                                        {
                                            yrwmc = row["XGRMC"].ToString();
                                            ywrno = row["ZJHM"].ToString();
                                        }
                                        else
                                        {
                                            yrwmc += "," + row["XGRMC"].ToString();
                                            ywrno += "," + row["ZJHM"].ToString();
                                        }
                                    }
                                }
                            }
                            WBCLFInfo wci = (from wi in wbinfos where wi.HTID == htid select wi).FirstOrDefault();
                            if (null != wci)
                            {
                                wci.SYQR      += "," + bdc.data.dt.Rows[0]["SYQR"].ToString();
                                wci.BARPASSNO += "," + bdc.data.dt.Rows[0]["BARPASSNO"].ToString();
                            }
                            else
                            {
                                wci           = new WBCLFInfo();
                                wci.BARPASSNO = bdc.data.dt.Rows[0]["BARPASSNO"].ToString();
                                wci.SYQR      = bdc.data.dt.Rows[0]["SYQR"].ToString();
                                wci.HTID      = htid.Trim();
                                wci.CQZH      = bdc.data.dt.Rows[0]["CQZH"].ToString();


                                wci.HID     = bdc.data.dt.Rows[0]["HID"].ToString();
                                wci.ZID     = bdc.data.dt.Rows[0]["ZID"].ToString();
                                wci.CLHTBAH = bdc.data.dt.Rows[0]["CLHTBAH"].ToString();
                                wci.HTBASJ  = bdc.data.dt.Rows[0]["HTBASJ"] == null ? null : Convert.ToDateTime(bdc.data.dt.Rows[0]["HTBASJ"]).ToString();
                                wci.FWZL    = bdc.data.dt.Rows[0]["FWZL"].ToString();
                                wci.FWLX    = bdc.data.dt.Rows[0]["FWLX"].ToString();
                                wci.FWJG    = bdc.data.dt.Rows[0]["FWJG"].ToString();
                                wci.HX      = bdc.data.dt.Rows[0]["HX"].ToString();
                                wci.JZMJ    = bdc.data.dt.Rows[0]["JZMJ"].ToString();
                                wci.TNJZMJ  = bdc.data.dt.Rows[0]["TNJZMJ"].ToString();

                                wci.FTJZMJ = bdc.data.dt.Rows[0]["FTJZMJ"].ToString();
                                wci.JYJG   = bdc.data.dt.Rows[0]["JYJG"].ToString();
                                wci.FKLX   = bdc.data.dt.Rows[0]["FKLX"].ToString();
                                wci.DKFS   = bdc.data.dt.Rows[0]["DKFS"].ToString();
                                wci.FKSJ   = bdc.data.dt.Rows[0]["FKSJ"].ToString();

                                wci.QDSJ     = bdc.data.dt.Rows[0]["QDSJ"].ToString();
                                wci.QRSJ     = bdc.data.dt.Rows[0]["QRSJ"].ToString();
                                wci.QRQZSJ   = bdc.data.dt.Rows[0]["QRQZSJ"].ToString();
                                wci.ZHBGTGSJ = bdc.data.dt.Rows[0]["ZHBGTGSJ"].ToString();
                                wci.JSSJ     = bdc.data.dt.Rows[0]["JSSJ"].ToString();
                                wci.SFYX     = bdc.data.dt.Rows[0]["SFYX"].ToString();

                                wci.YWR   = yrwmc;
                                wci.YWRNO = ywrno;

                                wbinfos.Add(wci);
                            }
                        }
                    }
                }
            }
            if (wbinfos.Count == 0)
            {
                wbinfos.Add(new WBCLFInfo {
                    HTID = "网备中无此房屋合同信息"
                });
            }
            EasyUIGridModel ret = new EasyUIGridModel(0, wbinfos.Count, wbinfos);

            return(ret);
        }