Exemplo n.º 1
0
        /// <summary>
        /// 查询全部
        /// </summary>
        private void GetAllCar()
        {
            string          errmsg    = "";
            DataTable       dt        = new DataTable();
            DataTable       dt1       = new DataTable();
            DataTable       dt2       = new DataTable();
            DataTable       dt3       = new DataTable();
            string          data      = Request["data"];
            int             page      = 0;
            int             totalnum  = 0; //记录总数
            int             pagecount = 0; //页总数
            int             pagesize  = 15;
            BLLProposer     mybll     = new BLLProposer();
            RequesReturnCar rm        = ObjectSerializeHelper.JsonToObject <RequesReturnCar>(data);

            page = rm.page;
            bool result = mybll.GetAllCar(pagesize, page, ref totalnum, ref pagecount, ref dt, ref dt1, ref dt2, ref dt3, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower) + ",\"data1\":" + ObjectSerializeHelper.DataTableToJson(dt1, ObjectSerializeHelper.ColumnNameLetterCase.ToLower) + ",\"data2\":" + ObjectSerializeHelper.DataTableToJson(dt2, ObjectSerializeHelper.ColumnNameLetterCase.ToLower) + ",\"data3\":" + ObjectSerializeHelper.DataTableToJson(dt3, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                json += ",\"pagecount\":" + pagecount;
                json += ",\"totalnum\":" + totalnum;
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 拒绝原因
        /// </summary>
        private void ApplyFalse()
        {
            string    errmsg = "";
            DataTable dt     = new DataTable();
            string    data   = Request["data"];

            //string applycode = Request["applycode"];
            //string reason = Request["reason"];
            RequesCarFalse rm        = ObjectSerializeHelper.JsonToObject <RequesCarFalse>(data);
            string         applycode = rm.applycode;
            string         reason    = rm.reason;
            string         susercode = rm.susercode;

            BLLProposer mybll  = new BLLProposer();
            bool        result = mybll.ApplyFalse(applycode, reason, susercode, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 重新选择车牌
        /// </summary>
        private void RegainCar()
        {
            string     errmsg         = "";
            DataTable  dt             = new DataTable();
            string     data           = Request["data"];
            RequesDCar rm             = ObjectSerializeHelper.JsonToObject <RequesDCar>(data);
            string     applycode      = rm.applycode;
            string     platenumber    = rm.platenumber;
            string     Oldplatenumber = rm.Oldplatenumber;
            string     reremark       = rm.reremark;

            BLLProposer mybll  = new BLLProposer();
            bool        result = mybll.RegainCar(applycode, platenumber, Oldplatenumber, reremark, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 查询通过
        /// </summary>
        private void GetTrue()
        {
            string        errmsg   = "";
            string        data     = Request["data"];
            DataTable     dt       = new DataTable();
            RequesGetTure rm       = ObjectSerializeHelper.JsonToObject <RequesGetTure>(data);
            string        pagecode = rm.pagecode;
            string        nowrow   = rm.nowrow;


            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.GetTrue(pagecode, nowrow, ref dt, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// excle查询
        /// </summary>

        private void GetExcel()
        {
            string            errmsg    = "";
            int               page      = 0;
            int               totalnum  = 0; //记录总数
            int               pagecount = 0; //页总数
            int               pagesize  = 15;
            DataTable         dt        = new DataTable();
            string            data      = Request["data"];
            RequesExcel       rm        = ObjectSerializeHelper.JsonToObject <RequesExcel>(data);
            BLLUniversalExcel mybll     = new BLLUniversalExcel();
            bool              result    = mybll.updataAddExcleHeader(pagesize, page, ref totalnum, ref pagecount,
                                                                     ref dt, rm.pagecode, rm.onetypehcode, rm.onetype,
                                                                     rm.onetypevalues, rm.datetypehcode, rm.datetypeselecttype, rm.startdate,
                                                                     rm.enddata, rm.startdata_time, rm.enddata_time,
                                                                     rm.digitaltypehcode, rm.digitaltypeselecttype, rm.twotypetype,
                                                                     rm.oneval1, rm.oneval2, rm.choosetypehcode, rm.choosetypeselecttype, rm.choosetype, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                json += ",\"pagecount\":" + pagecount;
                json += ",\"totalnum\":" + totalnum;
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 点击驳回
        /// </summary>
        private void Applyfalse()
        {
            string      errmsg   = "";
            string      data     = Request["data"];
            DataTable   dt       = new DataTable();
            RequesFalse rm       = ObjectSerializeHelper.JsonToObject <RequesFalse>(data);
            string      pagecode = rm.pagecode;
            string      usercode = rm.usercode;
            string      nowrows  = rm.nowrows;
            string      sort     = rm.sort;
            string      cause    = rm.cause;

            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.Applyfalse(pagecode, nowrows, sort, cause, usercode, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 查询行dengdeng
        /// </summary>
        private void GetRow()
        {
            string     errmsg   = "";
            string     data     = Request["data"];
            DataTable  dt       = new DataTable();
            DataTable  dt1      = new DataTable();
            DataTable  dt2      = new DataTable();
            DataTable  dt3      = new DataTable();
            DataTable  dt4      = new DataTable();
            DataTable  dt5      = new DataTable();
            RequestRow info     = ObjectSerializeHelper.JsonToObject <RequestRow>(data);
            string     pagecode = info.pagecode;
            string     usercode = info.usercode;
            string     nowrow   = info.nowrow;

            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.GetRow(pagecode, usercode, nowrow, ref dt, ref dt1, ref dt2, ref dt3, ref dt4, ref dt5, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower) + ",\"data1\":" + ObjectSerializeHelper.DataTableToJson(dt1, ObjectSerializeHelper.ColumnNameLetterCase.ToLower)
                              + ",\"data2\":" + ObjectSerializeHelper.DataTableToJson(dt2, ObjectSerializeHelper.ColumnNameLetterCase.ToLower) + ",\"data3\":" + ObjectSerializeHelper.DataTableToJson(dt3, ObjectSerializeHelper.ColumnNameLetterCase.ToLower)
                              + ",\"data4\":" + ObjectSerializeHelper.DataTableToJson(dt4, ObjectSerializeHelper.ColumnNameLetterCase.ToLower) + ",\"data5\":" + ObjectSerializeHelper.DataTableToJson(dt5, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// 角色授权####
        /// </summary>
        private void RoleAu()
        {
            string      errmsg   = "";
            DataTable   dt       = new DataTable();
            string      data     = Request["data"];
            RequestRole info     = ObjectSerializeHelper.JsonToObject <RequestRole>(data);
            string      pagecode = info.pagecode;
            string      rolecode = info.rolecode;
            string      usercode = info.usercode;


            List <RequestRolePage> rolepage = info.rolepage;
            BLLUserManage          mybll    = new BLLUserManage();
            bool result = mybll.RoleAu(pagecode, rolepage, usercode, rolecode, ref errmsg);

            if (result)
            {
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", ""));
                Response.End();
            }
            else
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// 车辆情况
        /// </summary>
        private void GetUseCar()
        {
            string    errmsg = "";
            DataTable dt     = new DataTable();
            string    data   = Request["data"];


            RequesUseCar rm          = ObjectSerializeHelper.JsonToObject <RequesUseCar>(data);
            string       platenumber = rm.oneval;
            string       plat        = rm.onetype;
            string       datetype    = rm.datetype;
            // string usercode = rm.usercode;
            string      startdate = rm.startdate;
            string      enddate   = rm.enddate;
            string      sort      = rm.sort;
            string      sortfield = rm.sortfield;
            BLLProposer mybll     = new BLLProposer();
            bool        result    = mybll.GetUseCar(platenumber, plat, startdate, datetype, enddate, sort, sortfield, ref dt, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// 立即还车
        /// </summary>
        private void SendReturn()
        {
            string         errmsg       = "";
            DataTable      dt           = new DataTable();
            string         data         = Request["data"];
            RequesCarFalse rm           = ObjectSerializeHelper.JsonToObject <RequesCarFalse>(data);
            string         applycode    = rm.applycode;
            string         endplay      = rm.endplay;
            string         returnremark = rm.returnremark;
            string         usercode     = rm.usercode;
            BLLProposer    mybll        = new BLLProposer();
            bool           result       = mybll.SendReturn(applycode, endplay, returnremark, usercode, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// 提交派车申请单
        /// </summary>
        private void SendCar()
        {
            string    errmsg = "";
            DataTable dt     = new DataTable();
            string    data   = Request["data"];
            //string usercode = Request["usercode"];
            RequesSendCar rm             = ObjectSerializeHelper.JsonToObject <RequesSendCar>(data);
            string        applyname      = rm.applyname;
            string        accent         = rm.accent;
            string        department     = rm.department;
            string        proposernomber = rm.proposernomber;
            string        endsite        = rm.endsite;
            string        purpose        = rm.purpose;
            string        servicetime    = rm.servicetime;
            string        usercode       = rm.usercode;
            BLLProposer   mybll          = new BLLProposer();
            bool          result         = mybll.SendCar(applyname, accent, department, proposernomber, endsite, purpose, servicetime, usercode, ref errmsg);


            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 12
0
        /// <summary>
        /// 更新添加表头
        /// </summary>
        private void updataAddExcleHeader()
        {
            string errmsg            = "";
            string data              = Request["data"];
            RequestUniversalExcle rm = ObjectSerializeHelper.JsonToObject <RequestUniversalExcle>(data);

            BLLUniversalExcel mybll = new BLLUniversalExcel();

            bool result = mybll.updataAddExcleHeader(rm.pagecode, rm.ExcelHeader, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", ""));
                Response.End();
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// 添加表
        /// </summary>
        private void addPage()
        {
            string       errmsg   = "";
            string       data     = Request["data"];
            RequestTable info     = ObjectSerializeHelper.JsonToObject <RequestTable>(data);
            string       usercode = info.usercode;
            string       pagename = info.pagename;
            //  string gader = info.gader;  //审核等级
            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.addPage(pagename, usercode, info.审核用户, ref errmsg);

            if (result)
            {
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", ""));
                Response.End();
            }
            else
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// 车辆明细
        /// </summary>
        private void GetUseCarDetail()
        {
            string    errmsg = "";
            DataTable dt     = new DataTable();
            string    data   = Request["data"];

            int          page        = 0;
            int          totalnum    = 0; //记录总数
            int          pagecount   = 0; //页总数
            int          pagesize    = 20;
            RequesUseCar rm          = ObjectSerializeHelper.JsonToObject <RequesUseCar>(data);
            string       platenumber = rm.oneval;
            string       plat        = rm.onetype;
            string       datetype    = rm.datetype;
            // string usercode = rm.usercode;
            string      startdate = rm.startdate;
            string      enddate   = rm.enddate;
            string      username  = rm.username;
            string      applyname = rm.applyname;
            string      sort      = rm.sort;
            string      sortfield = rm.sortfield;
            BLLProposer mybll     = new BLLProposer();
            bool        result    = mybll.GetUseCarDetail(platenumber, plat, startdate, datetype, enddate, username, applyname, sort, sortfield, page, pagesize, ref totalnum, ref pagecount, ref dt, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                json += ",\"pagecount\":" + pagecount;
                json += ",\"totalnum\":" + totalnum;
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 15
0
        /// <summary>
        /// 编辑行
        /// </summary>
        private void updateRow()
        {
            string    errmsg = "";
            string    data   = Request["data"];
            DataTable dt     = new DataTable();
            RequesRow rm     = ObjectSerializeHelper.JsonToObject <RequesRow>(data);


            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.updateRow(rm.编辑的数据, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// 获取表名页面列表
        /// </summary>
        private void GetRolePageList()
        {
            string     errmsg   = "";
            DataTable  dt       = new DataTable();
            string     data     = Request["data"];
            RequestGet info     = ObjectSerializeHelper.JsonToObject <RequestGet>(data);
            string     rolecode = info.rolecode;

            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.GetRolePageList(rolecode, ref dt, ref errmsg);

            if (result)
            {
                string str = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", str));
                Response.End();
            }
            else
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
        }
Exemplo n.º 17
0
        /// <summary>
        /// 提交申请
        /// </summary>
        private void GetUsercode()
        {
            string    errmsg = "";
            DataTable dt     = new DataTable();
            string    data   = Request["data"];
            // string usercode = Request["usercode"];
            RequesReturnCar rm       = ObjectSerializeHelper.JsonToObject <RequesReturnCar>(data);
            string          usercode = rm.usercode;
            BLLProposer     mybll    = new BLLProposer();
            bool            result   = mybll.GetUsercode(usercode, ref dt, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// 删除表头
        /// </summary>
        private void deleteHead()
        {
            string       errmsg = "";
            string       data   = Request["data"];
            DataTable    dt     = new DataTable();
            RequesDelete rm     = ObjectSerializeHelper.JsonToObject <RequesDelete>(data);
            //string hcode = rm.hcode;
            //string pagecode = rm.pagecode;
            //string usercode = rm.usercode;
            BLLUserManage mybll  = new BLLUserManage();
            bool          result = mybll.deleteHead(rm.要删除的数据, ref errmsg);

            if (!result)
            {
                Response.Write(outjson.Replace("#code#", "-1").Replace("#msg#", errmsg));
                Response.End();
            }
            else
            {
                string json = "\"data\":" + ObjectSerializeHelper.DataTableToJson(dt, ObjectSerializeHelper.ColumnNameLetterCase.ToLower);
                Response.Write(outjson.Replace("#code#", "0").Replace("#msg#", "").Replace("\"data\":null", json));
                Response.End();
            }
        }