예제 #1
0
        public EQMMaintainProInfo getMaintainProInfo(string orderID)
        {
            EQMMaintainProInfo            proInfo   = new EQMMaintainProInfo();
            EQM_EQUIP_BASETAININFO_RELATE baseParam = new EQM_EQUIP_BASETAININFO_RELATE()
            {
                mesMaintainID = orderID
            };

            //获得保养项目
            proInfo.basetainInfos = releteBO.GetEntities(baseParam);

            EQM_EQUIP_SPARE_LIST spareParam = new EQM_EQUIP_SPARE_LIST()
            {
                mesMaintainID = orderID
            };

            //获得备品备件
            proInfo.spareLists = getMaintainOrderSpares(spareParam);
            return(proInfo);
        }
예제 #2
0
        public string uploadPic(int kid)
        {
            EQM_EQUIP_BASETAININFO_RELATE entity = releteBO.GetEntity(kid);
            HttpRequest request = HttpContext.Current.Request;
            string      urlPath = request.Url.GetLeftPart(UriPartial.Path).Replace("/uploadPic", ""); //IIS
            string      path    = System.Web.HttpContext.Current.Server.MapPath(".");                 //155服务器本地文件夹

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            HttpFileCollection FileCollect = request.Files;

            try
            {
                if (FileCollect.Count > 0)          //如果集合的数量大于0
                {
                    foreach (string str in FileCollect)
                    {
                        HttpPostedFile FileSave = FileCollect[str];       //用key获取单个文件对象HttpPostedFile
                        //将制定路径的图片添加到FileStream类中   
                        string savePath = path + "/" + FileSave.FileName; //通过此对象获取文件名
                        FileSave.SaveAs(savePath);                        //上传
                        if (string.IsNullOrEmpty(entity.AttachPath))
                        {
                            entity.AttachPath = urlPath + "/" + FileSave.FileName;
                        }
                        else
                        {
                            entity.AttachPath += "||" + urlPath + "/" + FileSave.FileName;
                        }
                    }
                    releteBO.UpdateSome(entity);
                }
                return("附件上传成功!");
            }
            catch (Exception ex)
            {
                return(ex.Message.ToString());
            }
        }
예제 #3
0
        //打开sop
        public string showAttach(int kid)
        {
            EQM_EQUIP_BASETAININFO_RELATE entity = releteBO.GetEntity(kid);

            return(entity.AttachPath);
        }
예제 #4
0
 public void updateMaintainProResult(EQM_EQUIP_BASETAININFO_RELATE relate)
 {
     releteBO.UpdateSome(relate);
 }