Esempio n. 1
0
 public ActionResult Create(SRM srm)
 {
     string strResult = string.Empty;
     bool bResult = SRMService.Add(srm);
     string msg = bResult ? "新增成功" : "新增失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet);
 }
Esempio n. 2
0
        //  /SRM/CreateExcelToClient/
        public FileStreamResult CreateExcelToClient()
        {
            int page = 0, rows = 0;
            //int id=0;// =Convert .ToInt32( Request.QueryString["id"]);
            //if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            //{
            //    id = Convert.ToInt32(Request.QueryString["id"]);
            //}
            int SRMID =Convert.ToInt32(Request.QueryString["ID"]);
            string SRMName = Request.QueryString["SRMName"];
            string OPCServiceName = Request.QueryString["OPCServiceName"];
            string GetRequest = Request.QueryString["GetRequest"];
            string GetAllow = Request.QueryString["GetAllow"];
            string GetComplete = Request.QueryString["GetComplete"];
            string PutRequest = Request.QueryString["PutRequest"];
            string PutAllow = Request.QueryString["PutAllow"];
            string PutComplete = Request.QueryString["PutComplete"];
            string Description = Request.QueryString["Description"];
            string State = Request.QueryString["State"];
            SRM srm = new SRM();
            srm.ID = SRMID;
            srm.SRMName = SRMName;
            srm.OPCServiceName = OPCServiceName;
            srm.GetRequest = GetRequest;
            srm.GetAllow = GetAllow;
            srm.GetComplete = GetComplete;
            srm.PutRequest = PutRequest;
            srm.PutAllow = PutAllow;
            srm.PutComplete = PutComplete;
            srm.Description = Description;
            srm.State = State;

            ExportParam ep = new ExportParam();
            ep.DT1 = SRMService.GetSRM(page, rows, srm);
            ep.HeadTitle1 = "堆垛机信息";
            return PrintService.Print(ep);
        }
Esempio n. 3
0
 //
 // POST: /SRM/Edit/5
 public ActionResult Edit(SRM srm)
 {
     string strResult = string.Empty;
     bool bResult = SRMService.Save(srm);
     string msg = bResult ? "修改成功" : "修改失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet);
 }
Esempio n. 4
0
 //
 // GET: /SRM/Details/
 public ActionResult Details(int page, int rows, FormCollection collection)
 {
     SRM srm = new SRM();
     srm.SRMName = collection["SRMName"] ?? "";
     srm.OPCServiceName = collection["OPCServiceName"] ?? "";
     srm.GetRequest = collection["GetRequest"] ?? "";
     srm.GetAllow = collection["GetAllow"] ?? "";
     srm.GetComplete = collection["GetComplete"] ?? "";
     srm.PutRequest = collection["PutRequest"] ?? "";
     srm.PutAllow = collection["PutAllow"] ?? "";
     srm.PutComplete = collection["PutComplete"] ?? "";
     srm.State = collection["State"] ?? "";
     var srmDetail = SRMService.GetDetails(page, rows,srm);
     return Json(srmDetail, "text", JsonRequestBehavior.AllowGet);
 }