예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                var userCode = Request.Params["userCode"];
                //userCode = "227";
                //获取货代ID
                IBaseService service = ServiceFactory.getService(54);
                service.setParams(new String[] { userCode });
                var    dt         = service.executeForDataTable();
                var    arryId     = new Leo.Data.Table(dt).ToArray();
                var    clientCode = arryId.GetValue(0) as string[];
                string Code_HD    = clientCode[0];

                //我的费用结算
                service = ServiceFactory.getService(58);
                service.setParams(new String[] { Code_HD });
                dt = service.executeForDataTable();
                var arry0 = new Leo.Data.Table(dt).ToArray();

                var arrys = new Array[1];
                arrys[0] = arry0;

                Json = Request.QueryString.Get("callback") + "(" + JsonConvert.SerializeObject(arrys) + ")";
            }
            catch (Exception ex)
            {
                LogTool.WriteLog(typeof(wdhyw3), ex);
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                var message  = Request.Params["message"];
                var str      = message.Split(' ');
                var sqlId    = str[0];
                var userCode = str[1];
                //获取船代ID
                IBaseService service = ServiceFactory.getService(54);
                service.setParams(new String[] { userCode });
                var    dt         = service.executeForDataTable();
                var    arryId     = new Leo.Data.Table(dt).ToArray();
                var    clientCode = arryId.GetValue(0) as string[];
                string Code_HD    = clientCode[0];

                var rownum = "360";

                service = ServiceFactory.getService(Convert.ToInt16(sqlId));
                service.setParams(new String[] { Code_HD, rownum });
                dt = service.executeForDataTable();
                var arry = new Leo.Data.Table(dt).ToArray();

                Json = Request.QueryString.Get("callback") + "(" + JsonConvert.SerializeObject(arry) + ")";
                //Json = JsonConvert.SerializeObject(arry);
            }
            catch (Exception ex)
            {
                LogTool.WriteLog(typeof(More_Table_yewushixiang), ex);
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                var userCode = Request.Params["userCode"];
                //userCode = "1190";

                //获取部门ID
                IBaseService service = ServiceFactory.getService(54);
                service.setParams(new String[] { userCode });
                var    dt              = service.executeForDataTable();
                var    arryId          = new Leo.Data.Table(dt).ToArray();
                var    clientCode      = arryId.GetValue(0) as string[];
                string Code_Department = clientCode[2];
                //我的个人信息
                service = ServiceFactory.getService(55);
                service.setParams(new String[] { userCode });
                dt = service.executeForDataTable();
                var arry0 = new Leo.Data.Table(dt).ToArray();
                //我的业务事项
                service = ServiceFactory.getService(57);
                service.setParams(new String[] { Code_Department });
                dt = service.executeForDataTable();
                var arry1 = new Leo.Data.Table(dt).ToArray();
                //我的已付账单
                service = ServiceFactory.getService(56);
                service.setParams(new String[] { Code_Department });
                dt = service.executeForDataTable();
                var arry2 = new Leo.Data.Table(dt).ToArray();
                ////我的费用结算
                //service = ServiceFactory.getService(58);
                //service.setParams(new String[] { Code_Department });
                //dt = service.executeForDataTable();
                //var arry3 = new Leo.Data.Table(dt).ToArray();
                ////我的当年每月支付额
                //service = ServiceFactory.getService(57);
                //service.setParams(new String[] { Code_Department });
                //dt = service.executeForDataTable();
                //var arry3 = new Leo.Data.Table(dt).ToArray();

                //我的港口结算余额
                string sql = string.Format(
                    "select sum(endtotal) from vw_client_endtotal where code_client='{0}'", Code_Department);
                dt = new Leo.Oracle.DataAccess(Leo.RegistryKey.KeyPathFinaces).ExecuteTable(sql);
                var arry3 = new Leo.Data.Table(dt).ToArray();
                //我的本月支付
                int      year  = DateTime.Now.Year;
                int      month = DateTime.Now.Month;
                DateTime firstDayOfThisMonth = new DateTime(year, month, 1);
                DateTime lastDayOfThisMonth  = new DateTime(year, month, DateTime.DaysInMonth(year, month));
                sql = string.Format(
                    "select sum(total) as total from jszx_fp t  where t.code_client='{0}' and t.CREATETIME >= To_Date('{1}', 'yyyy-MM-dd HH24:MI:SS') and t.CREATETIME < To_Date('{2}', 'yyyy-MM-dd HH24:MI:SS')", Code_Department, firstDayOfThisMonth, lastDayOfThisMonth);
                dt = new Leo.Oracle.DataAccess(Leo.RegistryKey.KeyPathHmw).ExecuteTable(sql);
                var arry4 = new Leo.Data.Table(dt).ToArray();

                var arrys = new Array[5];
                arrys[0] = arry0;
                arrys[1] = arry1;
                arrys[2] = arry2;
                arrys[3] = arry3;
                arrys[4] = arry4;

                Json = Request.QueryString.Get("callback") + "(" + JsonConvert.SerializeObject(arrys) + ")";
            }
            catch (Exception ex)
            {
                LogTool.WriteLog(typeof(jszx), ex);
            }
        }