Пример #1
0
 public ActionResult AjaxBatteryStatus()
 {
     try
     {
         using (InfoManageDataContext infocontext = new InfoManageDataContext())
         {
             using (webmeteo_g2DataContext context = new webmeteo_g2DataContext())
             {
                 List<DATA_STAB_InfoManage> stations = context.DATA_STAB_InfoManages.Where(c => c.CREATE_DATE.Year.Equals(DateTime.Now.Year) && c.CREATE_DATE.Month.Equals(DateTime.Now.Month) && c.CREATE_DATE.Day.Equals(DateTime.Now.Day) && c.CREATE_DATE.Hour.Equals(DateTime.Now.Hour)).ToList<DATA_STAB_InfoManage>();
                 List<dynamic> res = new List<dynamic>();
                 foreach (DATA_STAB_InfoManage battery in stations)
                 {
                     AWS_InfoManage aws = context.AWS_InfoManages.Where(c => c.STATION_NUMBER.Equals(battery.STATION_NUMBER)).FirstOrDefault();
                     if (aws != null)
                     {
                         Station infosta = infocontext.Stations.Where(c => c.StationNum.Equals(battery.STATION_NUMBER)).FirstOrDefault();
                         if (infosta != null)
                         {
                             //StationEquipmentsOnline online = infocontext.StationEquipmentsOnlines.Where(c => c.StationID.Equals(infosta.StationID) && c.ElementID.Equals(29)).FirstOrDefault();
                             var VOLTAGE = ((int)(battery.MB_VOLTAGE * 10)) / 10.0;
                             var TEMP = ((int)(battery.AWS_TEMP * 10)) / 10.0;
                             res.Add(new { SolerBord = "XS500", VaildDate = DateTime.Now.AddYears(3), SIM = infosta.SIM, StationTyp = infosta.StationType, STATION_NAME = aws.STATION_NAME, STATION_NUMBER = battery.STATION_NUMBER, VOLTAGE = VOLTAGE });
                         }
                     }
                 }
                 return Json(res, JsonRequestBehavior.AllowGet);
             }
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
        public ActionResult AjaxGetInfoStatistics(string InfoStatisticsStartDate, string InfoStatisticsEndDate)
        {
            try
            {
                using (InfoManageDataContext context = new InfoManageDataContext())
                {
                    DateTime dateInfoStatisticsStartDate = DateTime.ParseExact(InfoStatisticsStartDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
                    DateTime dateInfoStatisticsEndDate = DateTime.ParseExact(InfoStatisticsEndDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);

                    int stationMaintence = context.StationEquipmentsMaintenances.Where(c => c.MaintenanceDate < dateInfoStatisticsEndDate && c.MaintenanceDate > dateInfoStatisticsStartDate).Count();
                    int stationRepair = context.StationEquipmentsRepairs.Where(c => c.FaultEndDate < dateInfoStatisticsEndDate && c.FaultEndDate > dateInfoStatisticsStartDate).Count();
                    int systemMaintence = context.SystemMaintances.Where(c => c.MaintenanceDate < dateInfoStatisticsEndDate && c.MaintenanceDate > dateInfoStatisticsStartDate).Count();
                    int systemRepair = context.SystemRepairs.Where(c => c.RepairDate < dateInfoStatisticsEndDate && c.RepairDate > dateInfoStatisticsStartDate).Count();
                    int vidoConference = context.VideoConferenceMaintenances.Where(c => c.ConferenceDate < dateInfoStatisticsEndDate && c.ConferenceDate > dateInfoStatisticsStartDate).Count();
                    int networkMaintence = context.NetWorkMaintances.Where(c => c.MaintenanceDate < dateInfoStatisticsEndDate && c.MaintenanceDate > dateInfoStatisticsStartDate).Count();
                    int networkRepair = context.NetWorkRepairs.Where(c => c.FaultEndDate < dateInfoStatisticsEndDate && c.FaultEndDate > dateInfoStatisticsStartDate).Count();
                    List<dynamic> res = new List<dynamic>();
                    res.Add(new { stationMaintence, stationRepair, systemMaintence, systemRepair, vidoConference, networkMaintence, networkRepair });
                    return Json(res, JsonRequestBehavior.AllowGet);
                }
            }
            catch
            {
                return Json("", JsonRequestBehavior.AllowGet);
            }
        }
Пример #3
0
 public ActionResult AjaxGetSoftWareShareList(int flag)
 {
     List<SoftShare> res = new List<SoftShare>();
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             SqlParameter[] parames = new SqlParameter[1];
             SqlParameter filetype = new SqlParameter();
             filetype.ParameterName = "@FileType";
             filetype.SqlDbType = System.Data.SqlDbType.VarChar;
             filetype.Size = 25;
             filetype.Value = AllConsts.getSoftSahreType(flag);
             parames[0] = filetype;
             AllUNCPath result = context.Database.SqlQuery<AllUNCPath>("EXEC [dbo].[sp_SYS_GetUNCPath] @FileType", parames).FirstOrDefault();
             string filePath = Path.Combine(result.UNCPath, "");
             DirectoryInfo tmp = new DirectoryInfo(filePath);
             if (tmp.Exists)
             {
                 FileInfo[] allfiles = tmp.GetFiles();
                 Array.Sort(allfiles, new FileSort(FileOrder.LastAccessTime, FileAsc.Desc)); //按修改日期升序排列
                 foreach (FileInfo file in allfiles)
                 {
                     string[] tmpfilename = file.Name.Split(AllConsts.cookieEnd.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                     if (tmpfilename.Length == 3)
                     {
                         SoftShare share = new SoftShare();
                         share.FileType = AllConsts.getSoftSahreType(flag);
                         share.Share = tmpfilename[0];
                         share.SoftName = tmpfilename[2];
                         share.envirnments = tmpfilename[1];
                         share.SoftSize = (int)file.Length;
                         share.UpDateDate = file.LastWriteTime;
                         res.Add(share);
                     }
                 }
             }
             return Json(res, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json(res, JsonRequestBehavior.AllowGet);
     }
     //try
     //{
     //    using (InfoManageDataContext context = new InfoManageDataContext())
     //    {
     //        int belonging = int.Parse(flag);
     //        resultautostaion = context.SoftShares.Where(c => c.Belonging.Equals(belonging)).ToList<SoftShare>();
     //    }
     //    return Json(resultautostaion, JsonRequestBehavior.AllowGet);
     //}
     //catch
     //{
     //    return Json(resultautostaion, JsonRequestBehavior.AllowGet);
     //}
 }
Пример #4
0
 public ActionResult addStationAtmosphericComposition(string StationNum,
  string StationBuildDate,
  string StationName,
  int StoragesInfoID,
  int transportManageType,
  string StationType,
  string StationManufacturer,
  string StationLongitude,
  string StationLatitude,
  string StationAltitude,
  string Operator)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             AtmosphericCompositionStation result = context.AtmosphericCompositionStations.Where(c => c.StationNum.Equals(StationNum)).FirstOrDefault();
             if (result == null)
             {
                 AtmosphericCompositionStation newstation = new AtmosphericCompositionStation();
                 newstation.StationNum = StationNum;
                 newstation.StationBuildDate = DateTime.ParseExact(StationBuildDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
                 newstation.StationName = StationName;
                 newstation.StoragesInfoID = StoragesInfoID;
                 newstation.transportManageType = transportManageType;
                 newstation.StationType = StationType;
                 newstation.StationManufacturer = StationManufacturer;
                 newstation.StationLongitude = StationLongitude;
                 newstation.StationLatitude = StationLatitude;
                 newstation.StationAltitude = StationAltitude;
                 newstation.Operator = Operator;
                 context.AtmosphericCompositionStations.Add(newstation);
             }
             else
             {
                 result.StationName = StationName;
                 result.transportManageType = transportManageType;
                 result.StationType = StationType;
                 result.StationManufacturer = StationManufacturer;
                 result.StationLongitude = StationLongitude;
                 result.StationLatitude = StationLatitude;
                 result.StationAltitude = StationAltitude;
                 result.Operator = Operator;
             }
             context.SaveChanges();
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetNetWorkMaintenanceList(int StoragesInfoID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             List<dynamic> list = (from c in context.NetWorkMaintances
                                   join d in context.NetworkEquipments
                                   on c.NetworkEquipmentCode equals d.NetworkEquipmentCode
                                   orderby c.NetWorkMaintanceID descending
                                   select new { c.NetWorkMaintanceID, c.NetworkEquipmentCode, c.Reportor, c.ReportDate, c.MaintenanceDate, d.NetworkEquipmentName, d.NetworkEquipmentType, d.NetworkEquipmentManufacturer, d.NetworkEquipmentProvider }).ToList<dynamic>();
             return Json(list, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
Пример #6
0
 public ActionResult AjaxDellUpRequest(int UpRequestID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             UpRequest stations123 = context.UpRequests.Where(c => c.UpRequestID.Equals(UpRequestID)).FirstOrDefault();
             if (stations123 != null)
             {
                 context.UpRequests.Remove(stations123);
             }
             context.SaveChanges();
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
Пример #7
0
 public ActionResult AjaxGetStationManageList(string SDate)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             DateTime tmpdate = DateTime.ParseExact(SDate + " 00:00", AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             List<dynamic> results = (from c in context.Stations
                                      where c.LastModifyDate > tmpdate && (c.LastModifier.Equals(AllConsts.adminName))
                                      join d in context.StoragesInfos
                                      on c.StoragesInfoID equals d.StoragesInfoID
                                      select new { c.StationBuildDate, c.StationNum, c.StationName, c.StationAdrass, d.StoragesInfoName }).ToList<dynamic>();
             return Json(results, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
Пример #8
0
        public ActionResult AjaxUpload(string FileType, string envirnments)
        {
            HttpPostedFileBase upload = Request.Files["upLoadFile"];
            try
            {
                if (Request.Cookies["User"] != null)
                {
                    HttpCookie aCookie = Request.Cookies["User"];
                    string realname = Server.UrlDecode(aCookie["RealName"]);

                    if (upload != null && FileType != null)
                    {
                        if (upload.ContentLength > 0)
                        {
                            using (InfoManageDataContext context = new InfoManageDataContext())
                            {
                                SqlParameter[] parames = new SqlParameter[1];
                                SqlParameter filetype = new SqlParameter();
                                filetype.ParameterName = "@FileType";
                                filetype.SqlDbType = System.Data.SqlDbType.VarChar;
                                filetype.Size = 25;
                                filetype.Value = FileType;
                                parames[0] = filetype;
                                AllUNCPath result = context.Database.SqlQuery<AllUNCPath>("EXEC [dbo].[sp_SYS_GetUNCPath] @FileType", parames).FirstOrDefault();
                                string filePath = Path.Combine(result.UNCPath, realname + AllConsts.cookieEnd + envirnments + AllConsts.cookieEnd + upload.FileName);
                                FileInfo tmp = new FileInfo(filePath);
                                if (tmp.Exists)
                                    tmp.Delete();
                                upload.SaveAs(filePath);
                                return Json("OK", JsonRequestBehavior.AllowGet);
                            }
                        }
                    }
                }
            }
            catch
            {
                return Json("NO", JsonRequestBehavior.AllowGet);
            }
            return Json("NO", JsonRequestBehavior.AllowGet);
        }
 public ActionResult AjaxGetNetWorkMaintanceDetails(int NetWorkMaintanceID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             NetWorkMaintance result = context.NetWorkMaintances.Find(NetWorkMaintanceID);
             if (result != null)
             {
                 NetworkEquipment station = context.NetworkEquipments.Where(c => c.NetworkEquipmentCode.Equals(result.NetworkEquipmentCode)).FirstOrDefault();
                 if (station != null)
                     return Json(new { NetworkEquipmentCode = station.NetworkEquipmentCode, NetworkEquipmentName = station.NetworkEquipmentName, NetworkEquipmentType = station.NetworkEquipmentType, NetworkEquipmentManufacturer = station.NetworkEquipmentManufacturer, NetworkEquipmentCategory = station.NetworkEquipmentCategory, NetWorkDeviceUsage = station.NetWorkDeviceUsage, ReportDate = result.ReportDate, Reportor = result.Reportor, MaintenanceDate = result.MaintenanceDate, MaintenanceDescription = result.MaintenanceDescription, Maintenner = result.Maintenner, NetWorkMaintanceID = result.NetWorkMaintanceID }, JsonRequestBehavior.AllowGet);
             }
             return Json("", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
Пример #10
0
 public ActionResult AjaxGetEquipmentManageList(string SDate)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             DateTime tmpdate = DateTime.ParseExact(SDate + " 00:00", AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             List<EquipmentsStorage> equipments = context.EquipmentsStorages.Where(c => c.LastModifyDate > tmpdate && (c.LastModifier.Equals(AllConsts.adminName))).ToList<EquipmentsStorage>();
             List<dynamic> results = new List<dynamic>();
             foreach (EquipmentsStorage equip in equipments)
             {
                 Element storage = context.Elements.Where(c => c.ElementID.Equals(equip.ElementID)).FirstOrDefault();
                 results.Add(new { equip.LastModifyDate, ElementID = equip.ElementID, SparePartsName = storage.SparePartsName, ApplicableModels = equip.ApplicableModels, CheckDate = equip.CheckDate, Operator = equip.Operator, SparePartsBelongingStatus = equip.SparePartsBelongingStatus, SparePartsCode = equip.SparePartsCode, SparePartsManufacturer = equip.SparePartsManufacturer, SparePartsStatus = equip.SparePartsStatus, SparePartsType = equip.SparePartsType, TurnInDate = equip.TurnInDate, VaildDate = equip.VaildDate });
             }
             return Json(results, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
Пример #11
0
 public ActionResult AjaxAtmosphericCompositionStation()
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             List<dynamic> res = new List<dynamic>();
             List<AtmosphericCompositionStation> atmosphericStation = context.AtmosphericCompositionStations.ToList<AtmosphericCompositionStation>();
             foreach (AtmosphericCompositionStation sta in atmosphericStation)
             {
                 string StationLongitude = sta.StationLongitude;
                 string StationLatitude = sta.StationLatitude;
                 double longitude = int.Parse(StationLongitude.Substring(0, 3)) + int.Parse(StationLongitude.Substring(3, 2)) / 60.0 + int.Parse(StationLongitude.Substring(5, 2)) / 3600.0;
                 double latitude = int.Parse(StationLatitude.Substring(0, 2)) + int.Parse(StationLatitude.Substring(2, 2)) / 60.0 + int.Parse(StationLatitude.Substring(4, 2)) / 3600.0;
                 res.Add(new { StationType = (int)AllConsts.SPETIALSTATION_TYPE.AtmosphericCompositionStation, StationTypeName = AllConsts.getSpetialStationType((int)AllConsts.SPETIALSTATION_TYPE.AtmosphericCompositionStation), sta.StationNum, sta.StationName, StationLongitude = longitude.ToString(), StationLatitude = latitude.ToString() });
             }
             return Json(res, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxStationEquipmentsMaintenanceAdd(string RegionName, int StoragesInfoID, string StationNum, string StationClass, string StationType, string StationManufacturer, string MaintenanceDescription, string Maintenner, string MaintenanceDate, bool powerSta, bool communicationSta, bool samplingSta, bool senserSta, bool cleaningSta, bool stableSta, string Reportor, string ReportDate, string MaintenanceCommants)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             DateTime MaintenanceDatetmp = DateTime.ParseExact(MaintenanceDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             StationEquipmentsMaintenance newStationEquipmentsMaintenance = new StationEquipmentsMaintenance();
             newStationEquipmentsMaintenance.RegionName = RegionName;
             newStationEquipmentsMaintenance.StoragesInfoID = StoragesInfoID;
             newStationEquipmentsMaintenance.StationNum = StationNum;
             newStationEquipmentsMaintenance.MaintenanceDescription = MaintenanceDescription;
             newStationEquipmentsMaintenance.Maintenner = Maintenner;
             newStationEquipmentsMaintenance.MaintenanceDate = DateTime.ParseExact(MaintenanceDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.powerSta = powerSta;
             newStationEquipmentsMaintenance.communicationSta = communicationSta;
             newStationEquipmentsMaintenance.samplingSta = samplingSta;
             newStationEquipmentsMaintenance.senserSta = senserSta;
             newStationEquipmentsMaintenance.cleaningSta = cleaningSta;
             newStationEquipmentsMaintenance.stableSta = stableSta;
             newStationEquipmentsMaintenance.Reportor = Reportor;
             newStationEquipmentsMaintenance.ReportDate = DateTime.ParseExact(ReportDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.MaintenanceCommants = MaintenanceCommants;
             StationEquipmentsMaintenance result = context.StationEquipmentsMaintenances.Where(c => c.StationNum.Equals(StationNum) && c.MaintenanceDate.Equals(MaintenanceDatetmp)).FirstOrDefault();
             if (result == null)
                 context.StationEquipmentsMaintenances.Add(newStationEquipmentsMaintenance);
             else
             {
                 result.MaintenanceDescription = newStationEquipmentsMaintenance.MaintenanceDescription;
                 result.MaintenanceCommants = newStationEquipmentsMaintenance.MaintenanceCommants;
                 result.powerSta = newStationEquipmentsMaintenance.powerSta;
                 result.communicationSta = newStationEquipmentsMaintenance.communicationSta;
                 result.samplingSta = newStationEquipmentsMaintenance.samplingSta;
                 result.senserSta = newStationEquipmentsMaintenance.senserSta;
                 result.cleaningSta = newStationEquipmentsMaintenance.cleaningSta;
                 result.stableSta = newStationEquipmentsMaintenance.stableSta;
                 result.MaintenanceDate = newStationEquipmentsMaintenance.MaintenanceDate;
                 result.ReportDate = newStationEquipmentsMaintenance.ReportDate;
                 result.Maintenner = newStationEquipmentsMaintenance.Maintenner;
                 result.Reportor = newStationEquipmentsMaintenance.Reportor;
             }
             context.SaveChanges();
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxNetWorkRepairAdd(string NetworkEquipmentCode, string NetWorkDeviceUsage, string NetworkEquipmentType, string NetworkEquipmentManufacturer, string FaultStartDate, string FaultEndDate, string PhenomenalDescription, string Resonance, string HandlingVResults, string Reportor, string ReportDate, bool UpRepair, string Repairer)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             NetWorkRepair newStationEquipmentsMaintenance = new NetWorkRepair();
             newStationEquipmentsMaintenance.NetworkEquipmentCode = NetworkEquipmentCode;
             newStationEquipmentsMaintenance.FaultStartDate = DateTime.ParseExact(FaultStartDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.FaultEndDate = DateTime.ParseExact(FaultEndDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.Resonance = Resonance;
             newStationEquipmentsMaintenance.PhenomenalDescription = PhenomenalDescription;
             newStationEquipmentsMaintenance.HandlingVResults = HandlingVResults;
             newStationEquipmentsMaintenance.Reportor = Reportor;
             newStationEquipmentsMaintenance.Repairer = Repairer;
             newStationEquipmentsMaintenance.ReportDate = DateTime.ParseExact(ReportDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.UpRepair = UpRepair;
             NetWorkRepair result = context.NetWorkRepairs.Where(c => c.NetworkEquipmentCode.Equals(newStationEquipmentsMaintenance.NetworkEquipmentCode) && c.ReportDate.Equals(newStationEquipmentsMaintenance.ReportDate)).FirstOrDefault();
             if (result == null)
                 context.NetWorkRepairs.Add(newStationEquipmentsMaintenance);
             else
             {
                 result.Resonance = newStationEquipmentsMaintenance.Resonance;
                 result.PhenomenalDescription = newStationEquipmentsMaintenance.PhenomenalDescription;
                 result.HandlingVResults = newStationEquipmentsMaintenance.HandlingVResults;
                 result.FaultStartDate = newStationEquipmentsMaintenance.FaultStartDate;
                 result.FaultEndDate = newStationEquipmentsMaintenance.FaultEndDate;
                 result.Reportor = newStationEquipmentsMaintenance.Reportor;
                 result.Repairer = newStationEquipmentsMaintenance.Repairer;
                 result.UpRepair = newStationEquipmentsMaintenance.UpRepair;
             }
             context.SaveChanges();
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxNetWorkMaintanceAdd(string NetworkEquipmentCode, string Reportor, string ReportDate, string MaintenanceDescription, string Maintenner, string MaintenanceDate)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             NetWorkMaintance newStationEquipmentsMaintenance = new NetWorkMaintance();
             newStationEquipmentsMaintenance.NetworkEquipmentCode = NetworkEquipmentCode;
             newStationEquipmentsMaintenance.MaintenanceDescription = MaintenanceDescription;
             newStationEquipmentsMaintenance.Maintenner = Maintenner;
             newStationEquipmentsMaintenance.MaintenanceDate = DateTime.ParseExact(MaintenanceDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.Reportor = Reportor;
             newStationEquipmentsMaintenance.ReportDate = DateTime.ParseExact(ReportDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             NetWorkMaintance result = context.NetWorkMaintances.Where(c => c.NetworkEquipmentCode.Equals(NetworkEquipmentCode) && c.MaintenanceDate.Equals(newStationEquipmentsMaintenance.MaintenanceDate)).FirstOrDefault();
             if (result == null)
                 context.NetWorkMaintances.Add(newStationEquipmentsMaintenance);
             else
             {
                 result.MaintenanceDescription = newStationEquipmentsMaintenance.MaintenanceDescription;
                 result.MaintenanceDate = newStationEquipmentsMaintenance.MaintenanceDate;
                 result.Maintenner = newStationEquipmentsMaintenance.Maintenner;
                 result.ReportDate = newStationEquipmentsMaintenance.ReportDate;
                 result.Reportor = newStationEquipmentsMaintenance.Reportor;
             }
             context.SaveChanges();
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
        public ActionResult Front()
        {
            try
            {
                if (Request.Cookies["User"] != null)
                {
                    HttpCookie aCookie = Request.Cookies["User"];
                    ViewBag.RealName = Server.UrlDecode(aCookie["RealName"]);
                    int id = Convert.ToInt32(Server.UrlDecode(aCookie["ID"]));
                    int UnitNum = Convert.ToInt32(Server.UrlDecode(aCookie["UnitNum"]));
                    ViewBag.UnitName = Server.UrlDecode(aCookie["UnitName"]);

                    using (MemberShipDataContext context = new MemberShipDataContext())
                    {
                        UserProfile usr = context.UserProfiles.Find(id);
                        if (null != usr)
                        {
                            using (InfoManageDataContext onlinecontext = new InfoManageDataContext())
                            {
                                UserAction newaction = new UserAction();
                                newaction.ID = usr.ID;
                                newaction.RealName = usr.RealName;
                                newaction.ActionName = "EquipmentManagement";
                                newaction.CreateTime = DateTime.Now;
                                newaction.LastModifyTime = newaction.CreateTime;
                                onlinecontext.UserActions.Add(newaction);
                                onlinecontext.SaveChanges();
                            }
                        }
                    }

                    ViewBag.Title = "维修维护管理";
                    ViewBag.UnitNum = UnitNum;
                    return View(UnitNum);
                }
                else
                {
                    WebSecurity.Logout();
                    return RedirectToAction("Login", "Admin");
                }
            }
            catch
            {
                WebSecurity.Logout();
                return RedirectToAction("Login", "Admin");
            }
        }
        public ActionResult AjaxVideoConferenceMaintenanceAdd(string ConferenceName, string ConferencePosition, string ConferenceStatement, string Organizer, string ConferenceDate, string JoinUnits, string ConferenceMaintener, string Reportor, string ReportDate, string MaintenanceCommants)
        {
            try
            {
                using (InfoManageDataContext context = new InfoManageDataContext())
                {
                    VideoConferenceMaintenance newSystemRepair = new VideoConferenceMaintenance();
                    newSystemRepair.ConferenceName = ConferenceName;
                    newSystemRepair.ConferencePosition = ConferencePosition;
                    newSystemRepair.ConferenceStatement = ConferenceStatement;
                    newSystemRepair.Organizer = Organizer;
                    newSystemRepair.ConferenceDate = DateTime.ParseExact(ConferenceDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
                    newSystemRepair.JoinUnits = JoinUnits;
                    newSystemRepair.ConferenceMaintener = ConferenceMaintener;
                    newSystemRepair.Reportor = Reportor;
                    newSystemRepair.MaintenanceCommants = MaintenanceCommants;
                    newSystemRepair.ReportDate = DateTime.ParseExact(ReportDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);

                    VideoConferenceMaintenance result = context.VideoConferenceMaintenances.Where(c => c.ConferenceName.Equals(newSystemRepair.ConferenceName)).FirstOrDefault();
                    if (result == null)
                        context.VideoConferenceMaintenances.Add(newSystemRepair);
                    else
                    {
                        result.ConferencePosition = newSystemRepair.ConferencePosition;
                        result.ConferenceStatement = newSystemRepair.ConferenceStatement;
                        result.Organizer = newSystemRepair.Organizer;
                        result.ConferenceDate = newSystemRepair.ConferenceDate;
                        result.JoinUnits = newSystemRepair.JoinUnits;
                        result.ConferenceMaintener = newSystemRepair.ConferenceMaintener;
                        result.Reportor = newSystemRepair.Reportor;
                        result.MaintenanceCommants = newSystemRepair.MaintenanceCommants;
                        result.ReportDate = newSystemRepair.ReportDate;

                    }
                    context.SaveChanges();
                    return Json("OK", JsonRequestBehavior.AllowGet);
                }
            }
            catch
            {
                return Json("NO", JsonRequestBehavior.AllowGet);
            }
        }
 public ActionResult AjaxSystemRepairRemove(int SystemRepairID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             SystemRepair result = context.SystemRepairs.Find(SystemRepairID);
             if (result != null)
             {
                 context.SystemRepairs.Remove(result);
                 context.SaveChanges();
             }
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxStationEquipmentsRepairAdd(int StoragesInfoID, string StationNum, string SparePartsCode, string Resonance, string PhenomenalDescription, string HandlingVResults, bool UpRepair, string Reportor, string Repairer, string ReportDate, string FaultStartDate, string FaultEndDate)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             if (FaultEndDate == AllConsts.MAX_DATE_HOUR_MINUTE && UpRepair == false)
                 return Json("结束时间空!", JsonRequestBehavior.AllowGet);
             StationEquipmentsRepair newStationEquipmentsMaintenance = new StationEquipmentsRepair();
             newStationEquipmentsMaintenance.StoragesInfoID = StoragesInfoID;
             newStationEquipmentsMaintenance.StationNum = StationNum;
             newStationEquipmentsMaintenance.SparePartsCode = SparePartsCode;
             newStationEquipmentsMaintenance.FaultStartDate = DateTime.ParseExact(FaultStartDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             if (FaultEndDate == AllConsts.MAX_DATE_HOUR_MINUTE)
                 newStationEquipmentsMaintenance.FaultEndDate = DateTime.ParseExact(AllConsts.MAX_DATE_HOUR_MINUTE, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             else
                 newStationEquipmentsMaintenance.FaultEndDate = DateTime.ParseExact(FaultEndDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newStationEquipmentsMaintenance.Resonance = Resonance;
             newStationEquipmentsMaintenance.PhenomenalDescription = PhenomenalDescription;
             newStationEquipmentsMaintenance.HandlingVResults = HandlingVResults;
             newStationEquipmentsMaintenance.UpRepair = UpRepair;
             newStationEquipmentsMaintenance.Reportor = Reportor;
             newStationEquipmentsMaintenance.Repairer = Repairer;
             newStationEquipmentsMaintenance.ReportDate = DateTime.Now;
             if (newStationEquipmentsMaintenance.FaultEndDate < newStationEquipmentsMaintenance.FaultStartDate)
                 return Json("开始时间不能大于结束时间!", JsonRequestBehavior.AllowGet);
             StationEquipmentsRepair result = context.StationEquipmentsRepairs.Where(c => c.StationNum.Equals(StationNum) && c.ReportDate.Year.Equals(newStationEquipmentsMaintenance.ReportDate.Year) && c.ReportDate.Month.Equals(newStationEquipmentsMaintenance.ReportDate.Month) && c.ReportDate.Day.Equals(newStationEquipmentsMaintenance.ReportDate.Day)).FirstOrDefault();
             if (result == null)
             {
                 context.StationEquipmentsRepairs.Add(newStationEquipmentsMaintenance);
                 if (newStationEquipmentsMaintenance.UpRepair)
                 {
                     StoragesInfo storage = context.StoragesInfos.Where(c => c.StoragesInfoID.Equals(StoragesInfoID)).FirstOrDefault();
                     UpRequest newRequest = new UpRequest();
                     newRequest.IsBack = false;
                     newRequest.BackIsRead = false;
                     newRequest.Requester = newStationEquipmentsMaintenance.Reportor;
                     newRequest.RequestText = storage.StoragesInfoName + "," + StationNum + ",<code>设备</code>编号:" + SparePartsCode + ",请求维修!";
                     newRequest.RequestDate = DateTime.Now;
                     newRequest.RebackDate = newRequest.RequestDate;
                     newRequest.ToUnit = (int)AllConsts.BAOZHANG_UNIT_NUM;
                     context.UpRequests.Add(newRequest);
                 }
                 context.SaveChanges();
             }
             else
             {
                 result.Resonance = newStationEquipmentsMaintenance.Resonance;
                 result.PhenomenalDescription = newStationEquipmentsMaintenance.PhenomenalDescription;
                 result.HandlingVResults = newStationEquipmentsMaintenance.HandlingVResults;
                 result.UpRepair = newStationEquipmentsMaintenance.UpRepair;
                 result.FaultStartDate = newStationEquipmentsMaintenance.FaultStartDate;
                 result.FaultEndDate = newStationEquipmentsMaintenance.FaultEndDate;
                 result.ReportDate = newStationEquipmentsMaintenance.ReportDate;
                 result.Reportor = newStationEquipmentsMaintenance.Reportor;
                 result.Repairer = newStationEquipmentsMaintenance.Repairer;
                 if (newStationEquipmentsMaintenance.UpRepair)
                 {
                     StoragesInfo storage = context.StoragesInfos.Where(c => c.StoragesInfoID.Equals(StoragesInfoID)).FirstOrDefault();
                     UpRequest newRequest = new UpRequest();
                     newRequest.IsBack = false;
                     newRequest.BackIsRead = false;
                     newRequest.Requester = newStationEquipmentsMaintenance.Reportor;
                     newRequest.RequestText = storage.StoragesInfoName + "," + StationNum + ",<code>设备</code>编号:" + SparePartsCode + ",请求维修!";
                     newRequest.RequestDate = DateTime.Now;
                     newRequest.RebackDate = newRequest.RequestDate;
                     newRequest.ToUnit = (int)AllConsts.BAOZHANG_UNIT_NUM;
                     context.UpRequests.Add(newRequest);
                 }
                 context.SaveChanges();
             }
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetStationEquipmentsOnlineDetail(string SparePartsCode)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             EquipmentsStorage onlines = context.EquipmentsStorages.Where(c => c.SparePartsCode.Equals(SparePartsCode)).FirstOrDefault();
             return Json(onlines, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetStationEquipmentsOnline(string StationNum)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             List<StationEquipmentsOnline> onlines = context.StationEquipmentsOnlines.Where(c => c.StationNum.Equals(StationNum)).ToList<StationEquipmentsOnline>();
             return Json(onlines, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxStationEquipmentsRepairList(int StoragesInfoID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             List<dynamic> res = new List<dynamic>();
             if (StoragesInfoID.Equals(AllConsts.BAOZHANG_UNIT_NUM))
             {
                 //List<StationEquipmentsRepair> repairlist = context.StationEquipmentsRepairs.OrderByDescending(s => s.StationEquipmentsRepairID).ToList<StationEquipmentsRepair>();
                 //foreach (StationEquipmentsRepair rep in repairlist)
                 //{
                 //    Station sta = context.Stations.Where(c => c.StationNum.Equals(rep.StationNum)).FirstOrDefault();
                 //    res.Add(new { sta.StationName, sta.StationType, Repairer = rep.Repairer, rep.StationNum, rep.SparePartsCode, rep.FaultStartDate, rep.FaultEndDate, rep.Reportor, rep.StationEquipmentsRepairID });
                 //}
                 List<dynamic> list = (from c in context.StationEquipmentsRepairs
                                       join d in context.Stations
                                       on c.StationNum equals d.StationNum
                                       orderby c.StationEquipmentsRepairID descending
                                       select new { d.StationName, d.StationType, c.Repairer, c.StationNum, c.SparePartsCode, c.FaultStartDate, c.FaultEndDate, c.Reportor, c.StationEquipmentsRepairID }).ToList<dynamic>();
                 return Json(list, JsonRequestBehavior.AllowGet);
             }
             else
             {
                 //List<StationEquipmentsRepair> repairlist = context.StationEquipmentsRepairs.Where(c => c.StoragesInfoID.Equals(StoragesInfoID)).OrderByDescending(s => s.StationEquipmentsRepairID).ToList<StationEquipmentsRepair>();
                 //foreach (StationEquipmentsRepair rep in repairlist)
                 //{
                 //    Station sta = context.Stations.Where(c => c.StationNum.Equals(rep.StationNum)).FirstOrDefault();
                 //    res.Add(new { sta.StationName, sta.StationType, Repairer = rep.Repairer, rep.StationNum, rep.SparePartsCode, rep.FaultStartDate, rep.FaultEndDate, rep.Reportor, rep.StationEquipmentsRepairID });
                 //}
                 List<dynamic> list = (from c in context.StationEquipmentsRepairs
                                       join d in context.Stations
                                       on c.StationNum equals d.StationNum
                                       where c.StoragesInfoID.Equals(StoragesInfoID)
                                       orderby c.StationEquipmentsRepairID
                                       select new { d.StationName, d.StationType, c.Repairer, c.StationNum, c.SparePartsCode, c.FaultStartDate, c.FaultEndDate, c.Reportor, c.StationEquipmentsRepairID }).ToList<dynamic>();
                 return Json(list, JsonRequestBehavior.AllowGet);
             }
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetStationEquipmentsRepairDetails(int StationEquipmentsRepairID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             StationEquipmentsRepair result = context.StationEquipmentsRepairs.Find(StationEquipmentsRepairID);
             if (result != null)
             {
                 Station station = context.Stations.Where(c => c.StationNum.Equals(result.StationNum)).FirstOrDefault();
                 EquipmentsStorage equipment = context.EquipmentsStorages.Where(c => c.SparePartsCode.Equals(result.SparePartsCode)).FirstOrDefault();
                 StoragesInfo storage = context.StoragesInfos.Where(c => c.StoragesInfoID.Equals(equipment.SparePartsBelongingStatus)).FirstOrDefault();
                 Element elment = context.Elements.Where(c => c.ElementID.Equals(equipment.ElementID)).FirstOrDefault();
                 return Json(new { RegionName = storage.StoragesInfoName, StationClass = AllConsts.getStationClass(station.StationClass), SparePartsCode = result.SparePartsCode, SparePartsName = elment.SparePartsName, SparePartsManufacturer = equipment.SparePartsManufacturer, StoragesInfoID = result.StoragesInfoID, StationNum = result.StationNum, StationName = station.StationName, StationType = station.StationType, StationManufacturer = station.StationManufacturer, FaultEndDate = result.FaultEndDate, FaultStartDate = result.FaultStartDate, HandlingVResults = result.HandlingVResults, PhenomenalDescription = result.PhenomenalDescription, PhenomenalImage = result.PhenomenalImage, ReportDate = result.ReportDate, Repairer = result.Repairer, Reportor = result.Reportor, Resonance = result.Resonance, StationEquipmentsRepairID = result.StationEquipmentsRepairID, UpRepair = result.UpRepair }, JsonRequestBehavior.AllowGet);
             }
             return Json(result, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxSystemRepairAdd(string SystemName, string Reportor, string ReportDate, string RepairDescription, string Repairer, string RepairDate)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             SystemRepair newSystemRepair = new SystemRepair();
             newSystemRepair.SystemName = SystemName;
             newSystemRepair.RepairDescription = RepairDescription;
             newSystemRepair.Repairer = Repairer;
             newSystemRepair.RepairDate = DateTime.ParseExact(RepairDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             newSystemRepair.Reportor = Reportor;
             newSystemRepair.ReportDate = DateTime.ParseExact(ReportDate, AllConsts.HOUR_MINUTE, System.Globalization.DateTimeFormatInfo.CurrentInfo);
             SystemRepair result = context.SystemRepairs.Where(c => c.SystemName.Equals(newSystemRepair.SystemName) && c.RepairDate.Equals(newSystemRepair.RepairDate)).FirstOrDefault();
             if (result == null)
                 context.SystemRepairs.Add(newSystemRepair);
             else
             {
                 result.RepairDescription = newSystemRepair.RepairDescription;
                 result.Repairer = newSystemRepair.Repairer;
                 result.ReportDate = newSystemRepair.ReportDate;
                 result.Reportor = newSystemRepair.Reportor;
             }
             context.SaveChanges();
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetSystemRepairDetails(int SystemRepairID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             SystemRepair result = context.SystemRepairs.Find(SystemRepairID);
             return Json(result, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxUploadImgs(string FileType, string flag, int StationEquipmentsRepairID, string SparePartsCode)
 {
     HttpPostedFileBase upload = Request.Files["upLoadFile"];
     if (upload != null && FileType != null)
     {
         if (upload.ContentLength > 0)
         {
             using (InfoManageDataContext context = new InfoManageDataContext())
             {
                 try
                 {
                     SqlParameter[] parames = new SqlParameter[1];
                     SqlParameter filetype = new SqlParameter();
                     filetype.ParameterName = "@FileType";
                     filetype.SqlDbType = System.Data.SqlDbType.VarChar;
                     filetype.Size = 25;
                     filetype.Value = FileType;
                     parames[0] = filetype;
                     AllUNCPath result = context.Database.SqlQuery<AllUNCPath>("EXEC [dbo].[sp_SYS_GetUNCPath] @FileType", parames).FirstOrDefault();
                     string extname = System.IO.Path.GetExtension(upload.FileName);
                     string picName = SparePartsCode + flag + StationEquipmentsRepairID + extname;
                     string filePath = Path.Combine(result.UNCPath, picName);
                     FileInfo tmp = new FileInfo(filePath);
                     if (tmp.Exists)
                         tmp.Delete();
                     upload.SaveAs(filePath);
                     switch (flag)
                     {
                         case "故障图片":
                             StationEquipmentsRepair repair = context.StationEquipmentsRepairs.Where(c => c.StationEquipmentsRepairID.Equals(StationEquipmentsRepairID)).FirstOrDefault();
                             repair.PhenomenalImage = picName;
                             break;
                     }
                     context.SaveChanges();
                     return Json("OK", JsonRequestBehavior.AllowGet);
                 }
                 catch
                 {
                     return Json("NO", JsonRequestBehavior.AllowGet);
                 }
             }
         }
     }
     return Json("NO", JsonRequestBehavior.AllowGet);
 }
 public ActionResult AjaxGetSystemRepairList(int StoragesInfoID)
 {
     List<SystemRepair> result = new List<SystemRepair>();
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             result = context.SystemRepairs.OrderByDescending(s => s.SystemRepairID).ToList<SystemRepair>();
         }
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch
     {
         return Json(result, JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxVideoConferenceMaintenanceRemove(int VideoConferenceMaintenanceID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             VideoConferenceMaintenance result = context.VideoConferenceMaintenances.Find(VideoConferenceMaintenanceID);
             if (result != null)
             {
                 context.VideoConferenceMaintenances.Remove(result);
                 context.SaveChanges();
             }
             return Json("OK", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("NO", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetVideoConferenceMaintenanceDetails(int VideoConferenceMaintenanceID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             VideoConferenceMaintenance result = context.VideoConferenceMaintenances.Find(VideoConferenceMaintenanceID);
             return Json(result, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetNetWorkRepairDetails(int NetWorkRepairID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             NetWorkRepair result = context.NetWorkRepairs.Find(NetWorkRepairID);
             if (result != null)
             {
                 NetworkEquipment station = context.NetworkEquipments.Where(c => c.NetworkEquipmentCode.Equals(result.NetworkEquipmentCode)).FirstOrDefault();
                 if (station != null)
                     return Json(new { NetworkEquipmentName = station.NetworkEquipmentName, NetworkEquipmentManufacturer = station.NetworkEquipmentManufacturer, NetworkEquipmentType = station.NetworkEquipmentType, NetworkEquipmentCategory = station.NetworkEquipmentCategory, NetWorkDeviceUsage = station.NetWorkDeviceUsage, FaultEndDate = result.FaultEndDate, FaultStartDate = result.FaultStartDate, HandlingVResults = result.HandlingVResults, PhenomenalDescription = result.PhenomenalDescription, PhenomenalImage = result.PhenomenalImage, ReportDate = result.ReportDate, Reportor = result.Reportor, Resonance = result.Resonance, NetWorkRepairID = result.NetWorkRepairID, NetworkEquipmentCode = result.NetworkEquipmentCode, result.Repairer }, JsonRequestBehavior.AllowGet);
             }
             return Json("", JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult AjaxGetVideoConferenceMaintenanceList(int StoragesInfoID)
 {
     try
     {
         using (InfoManageDataContext context = new InfoManageDataContext())
         {
             List<VideoConferenceMaintenance> result = context.VideoConferenceMaintenances.OrderByDescending(s => s.VideoConferenceMaintenanceID).ToList<VideoConferenceMaintenance>();
             return Json(result, JsonRequestBehavior.AllowGet);
         }
     }
     catch
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }