コード例 #1
0
        public void RepairList(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            ht.Add("Name", context.Request["name"] ?? "");
            ht.Add("RepairMan", context.Request["IDCard"] ?? "");
            ht.Add("EQtype", context.Request["EQtype"] ?? "");
            ht.Add("PageIndex", context.Request["PageIndex"] ?? "1");
            ht.Add("PageSize", context.Request["PageSize"] ?? "10");
            bool ispage = true;

            if (!string.IsNullOrEmpty(context.Request["ispage"]))
            {
                ispage = Convert.ToBoolean(context.Request["ispage"]);
            }
            EmsModel.JsonModel repMod = new EmsBLL.OrderInfo().GetJsonModel_RepairLists(ht, ispage);
            repMod = nameCommon.AddCreateNameForData(repMod, 4, "RepairMan", "", "", context.Request["userName"] ?? "");
            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();

            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(repMod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #2
0
        public void LendDate(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];
            //当前页
            int startIndex = Convert.ToInt32(context.Request["startIndex"]);
            //页容量
            int pageSize = 999;//Convert.ToInt32(context.Request["pageSize"]);

            EmsModel.OrderEquipDetail Mod = new EmsModel.OrderEquipDetail();
            //Mod.Type = 3;
            //
            if (context.Request["Type"] != null)
            {
                Mod.Type = Convert.ToByte(context.Request["Type"]);
            }
            //
            if (context.Request["OrderId"] != null)
            {
                Mod.OrderId = Convert.ToInt32(context.Request["OrderId"]);
            }


            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = new EmsBLL.OrderInfo().GetJsonModelByOrder(Mod, startIndex, pageSize);
            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(mod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #3
0
        public void ToLend(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];

            string strData = context.Request["strData"];

            string OrderNo = context.Request["OrderNo"];
            string IDCard  = context.Request["IDCard"];
            string stuCard = context.Request["stuCard"];

            EmsModel.OrderInfo mod = new EmsModel.OrderInfo();
            mod.OrderNo       = "SY" + DateTime.Now.ToString("yy-MM-dd");
            mod.IDCard        = IDCard;
            mod.stuLoanIDCard = stuCard;
            mod.ExperimentId  = Convert.ToInt32(OrderNo);
            mod.Creator       = "admin";
            mod.CreateTime    = DateTime.Now;
            mod.Type          = 0;
            mod.Status        = 2;
            mod.IsDelete      = 0;
            mod.LoanName      = "admin";
            mod.LendTime      = DateTime.Now;

            bool isok = new EmsBLL.OrderInfo().Lend(strData, OrderNo, mod);

            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();

            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(isok) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #4
0
        public void GetDatePageLoan(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];
            //当前页
            int startIndex = Convert.ToInt32(context.Request["startIndex"]);
            //页容量
            int pageSize = Convert.ToInt32(context.Request["pageSize"]);

            EmsModel.OrderInfo Mod = new EmsModel.OrderInfo();
            //订单状态
            if (context.Request["Status"] != null && context.Request["Status"] != "-1")
            {
                Mod.Status = Convert.ToInt32(context.Request["Status"]);
            }
            //借用人
            if (context.Request["LoanName"] != null)
            {
                Mod.LoanName = context.Request["LoanName"];
            }


            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = new EmsBLL.OrderInfo().GetJsonModel(Mod, startIndex, pageSize);
            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(mod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #5
0
        public void GetDatePageNEW(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];
            //当前页
            int startIndex = Convert.ToInt32(context.Request["startIndex"]);
            //页容量
            int pageSize = Convert.ToInt32(context.Request["pageSize"]);

            EmsModel.View_LoanDate Mod = new EmsModel.View_LoanDate();

            //借用人
            if (context.Request["KaNo"] != null)
            {
                Mod.Creator = context.Request["KaNo"];
            }
            if (context.Request["stuKaNo"] != null)
            {
                Mod.stuLoanIDCard = context.Request["stuKaNo"];
                Mod.Creator       = null;
            }


            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = new EmsBLL.OrderInfo().GetJsonModel_Land(Mod, startIndex, pageSize);
            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(mod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #6
0
        public void GetDateL(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];

            string OrderNo = context.Request["OrderNo"];

            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = new EmsBLL.OrderInfo().GetJsonModelVO(OrderNo);
            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(mod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #7
0
        /// <summary>
        /// 获得订单设备
        /// </summary>
        /// <returns></returns>

        public void GetOrderEquipList(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            ht.Add("ExperimentId", context.Request["Id"].ToString());
            EmsBLL.OrderInfo   BLLOrderInfo = new EmsBLL.OrderInfo();
            EmsModel.JsonModel Model        = BLLOrderInfo.GetOrderEquipList(ht);

            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(ModelPlan);

            context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})");
            context.Response.End();
        }
コード例 #8
0
        public void ToEscheat(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];
            string strData  = context.Request["strData"];
            string orderID  = context.Request["orderID"];

            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            bool isok = new EmsBLL.OrderInfo().Escheat(strData, orderID);

            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(isok) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #9
0
        /// <summary>
        /// 获取订单数据(借还)
        /// </summary>
        /// <param name="context"></param>
        public void GetDate(HttpContext context)
        {
            string callback   = context.Request["jsoncallback"];
            int    startIndex = Convert.ToInt32(context.Request["startIndex"]);
            //状态
            int Status = Convert.ToInt32(context.Request["Status"]);
            //租借人
            string LoanName = context.Request["LoanName"];

            EmsModel.OrderInfo Mod = new EmsModel.OrderInfo();
            Mod.LoanName = LoanName;
            Mod.Status   = Status;
            ;
            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = new EmsBLL.OrderInfo().GetJsonModel(Mod, startIndex, 10);
            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(mod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #10
0
        public void ToOtherLend(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];

            string strData = context.Request["strData"];

            string OrderNo = context.Request["OrderNo"];

            string LoanName = context.Request["LoanName"];

            string Creator = context.Request["Creator"];

            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            bool isok = new EmsBLL.OrderInfo().OtherLend(strData, LoanName, Creator, OrderNo);

            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(isok) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #11
0
        /// <summary>
        /// 修改订单状态
        /// </summary>
        /// <param name="context"></param>

        public void UpdateOrderStatus(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];

            string orderNO       = context.Request["orderNO"];
            string orderDetailNO = context.Request["orderDetailNO"];
            int    DetailType    = Convert.ToInt32(context.Request["DetailType"]);

            EmsBLL.OrderInfo order = new EmsBLL.OrderInfo();
            //EmsModel.OrderInfo Mod = order.GetEmsModel(id);

            bool isok = order.Lend(orderNO, orderDetailNO, DetailType);

            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(isok)
            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(isok) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #12
0
        /// <summary>
        /// 生成订单
        /// </summary>
        /// <returns>结果</returns>

        public void CreateOrder(HttpContext context)
        {
            string callback = context.Request["jsoncallback"];

            EmsBLL.OrderInfo BLLOrderInfo = new EmsBLL.OrderInfo();

            Hashtable ht = new Hashtable();

            ht.Add("ExperimentId", context.Request["ExperimentId"].ToString());
            //ht.Add("YSelectStr", context.Request["YSelectStr"].ToString());
            ht.Add("LoanName", context.Request["LoanName"].ToString());
            ht.Add("Creator", context.Request["Creator"].ToString());
            ht.Add("Type", context.Request["Type"].ToString());

            EmsModel.JsonModel Model = BLLOrderInfo.CreateOrder(ht);

            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(result);

            //输出Json
            context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})");
            context.Response.End();
        }