예제 #1
0
 public ActionResult pdfmaintenance(string para)
 {
     //para='+$customer+'_'+$logo+'_'+$inno+'_'+$indate+'_'+$person+'_'+$insn+'_'+$detailstr
     //dgklsz_1B2FDAC4-FD68-41FD-84B8-AB4EF4C2F171_D5E5DAB8-DF5E-48FD-B95E-1E26BB7A1C72_3a659635-d7a2-4a0a-b78d-ae0a861a8a64.jpg
     //string 客户号0, string logo图片1, string 入库单号2, string 入库日期3, string 入库人4, string 入库流水号5, string 入库单明细6
     dynamic data = new System.Dynamic.ExpandoObject();
     CustomerEquipmentSpecModel device = new CustomerEquipmentSpecModel();
     CustomerEquipmentMaintenance repair = new CustomerEquipmentMaintenance();
     string logo = "";
     try
     {
         string[] t = para.Split('_');
         string code = t[0];
         Guid dguid = Guid.Parse(t[1]);
         Guid rguid = Guid.Parse(t[2]);
         device = managementService.GetOneCustomerEquipmentSpecs(code, dguid);
         repair = managementService.GetOneCustomerEquipmentMaintenance(rguid);
         logo = ConfigurationManager.AppSettings["VirtualRes"] + t[0] + "/images/" + t[3];
     }
     catch
     {
     }
     data.device = device;
     data.repair = repair;
     data.logo = logo;
     return View(data);
 }
예제 #2
0
        public ActionResult maintenancepage(string device, string guid, string t)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            CustomerEquipmentMaintenance one = new CustomerEquipmentMaintenance();
            string number = "";
            string person = Masterpage.CurrUser.alias;
            string type = t;
            string devicenumber = "";
            Guid deviceguid;
            try { deviceguid = Guid.Parse(device); }
            catch { return RedirectToAction("equipment"); }

            var d = managementService.GetOneCustomerEquipmentSpecs(Masterpage.CurrUser.client_code, deviceguid);
            devicenumber = d.customer_equipment_position_number;
            if (guid != null && guid.ToString() != "")
            {
                Guid g;
                try { g = Guid.Parse(guid); }
                catch { return RedirectToAction("equipment"); }
                one = managementService.GetOneCustomerEquipmentMaintenance(g);
                data.hv = 1;
                number = one.CustomerEqupmentMaintenanceNo;
                person = one.CustomerEquipmentMaintenancePerson;
                LogHelper.Info(Masterpage.CurrUser.alias, "601032:客户," + Masterpage.CurrUser.client_code + ",设备" + device + ",查看保养信息,保养guid" + guid);
            }
            else
            {
                number = managementService.CreatMaintenanceNumber(Masterpage.CurrUser.client_code).Replace(Masterpage.CurrUser.client_code + "-", "");
                data.hv = 0;
                one = new CustomerEquipmentMaintenance();
                LogHelper.Info(Masterpage.CurrUser.alias, "601032:客户," + Masterpage.CurrUser.client_code + ",设备" + device + ",新增保养信息");
            }
            data.device = device;
            data.guid = guid;
            data.person = person;
            data.devicenumber = devicenumber;
            data.number = number;
            data.ddltype = managementService.GetMaintenanceStyle();
            data.one = one;
            data.type = t;
            data.images = new List<ecoBio.Wms.ViewModel.KeyValue>();
            return View(data);
        }