private void DeleteRepair(Repair e) { DataServiceRepair dsRepair = new DataServiceRepair(); RepairList.Remove(e); dsRepair.DeleteRepair(e); }
public async Task <JsonResult> InsertRepair([FromBody] RepairList repair) { repair.UserId = GetUID(); var newRepair = await _repairListService.Insert(repair); return(Success(newRepair)); }
public ActionResult FinishDate(Repair record) { var result = false; var message = "Lưu thông tin không thành công"; RepairModel model = null; if (AccountInfo.Type != LoginType.Sale && AccountInfo.Username != "admin") { message = "Bạn chưa có quyền sử dụng chức năng này"; } else if (result = record.SaveFinishDate(UserID, Employee.ID)) { message = "Lưu thông tin thành công"; model = Repair.Get(UserID, Employee.ID, record.ID); var login = Login.Get(UserID); model.ViewInternalNote = login.Type == LoginType.Mechanic || login.Type == LoginType.Office || login.Username == "admin"; } if (Request.IsAjaxRequest()) { return(Json(new { result = result, message = message, html = result ? RenderPartialViewToString(Views.Detail, model) : null }, JsonRequestBehavior.DenyGet)); } var list = new RepairList(); list.Current = model; return(View(Views.History, list)); }
private int parseMapFiles() { UpdateLog.DEBUG_LOG("解析map文件+++"); int num = 1; RepairList.Clear(); this.BackDownloadList.Clear(); _backDownloadDict.Clear(); this._parsedMapDataList.Clear(); string resourceUrl = ""; for (int i = 0; i < this._currentData.VersionModelBaseList.Count; i++) { VersionModel model = this._currentData.VersionModelBaseList[i]; string str2 = model.Map_url.Replace(@"\", "/"); string str3 = str2.Substring(str2.LastIndexOf("/") + 1); string mapFile = Path.Combine(BaseFlow._storeDir, str3); resourceUrl = model.ResourceUrl; MapFileManage manage = new MapFileManage(); num = manage.parseMapFile(mapFile, model.ResourceUrl, BaseFlow._storeDir); if (num <= -1) { return(num); } this._parsedMapDataList.AddRange(manage.GetMapFileDataList()); } UpdateLog.DEBUG_LOG("解析map文件---"); return(num); }
public void damageTile() { List <RequireListTool> tempList = RepairList.generateListOrders((int)Random.Range(1, 4)); foreach (RequireListTool rlt in tempList) { repairList.Add(rlt); } isDamaged = true; }
public ActionResult Submit(Repair record) { var result = false; var list = new RepairList(); var model = new RepairModel(); var action = record.ID > 0 ? DbAction.Repair.Modify : DbAction.Repair.Create; var message = ""; if (!record.ProductID.HasValue && String.IsNullOrEmpty(record.ProductName)) { message = "Thiếu thông tin sản phẩm"; } else if (record.WarehouseID == 0) { message = "Chưa chọn kho"; } else { var warehouses = WarehouseInfo.FindAuthorized(UserID, Employee.ID, Employee.BussinessID, UserID, action); record.ReceiveWarehouseID = warehouses.FirstOrDefault().ID; model.Record = record.Save(ModelState, UserID, Employee.ID, Employee.BussinessID, Employee.Name); if (result = model.Record != null) { message = "Lưu thông tin thành công"; } } if (result) { if (record.ProductID.HasValue) { model.SelectedProduct = ProductInfo.Get(UserID, Employee.ID, record.ProductID.Value, false, action); } var login = Login.Get(UserID); model.ViewInternalNote = login.Type == LoginType.Mechanic || login.Type == LoginType.Office || login.Username == "admin"; } else { model.Record = record; } model.Record.Messages = new List <string>() { message }; list.Current = model; if (Request.IsAjaxRequest()) { return(Json(new { result = result, message = message, html = result ? RenderPartialViewToString(Views.HistoryPartial, list) : null }, JsonRequestBehavior.DenyGet)); } return(RedirectToAction("History")); }
public override void Uninitialize() { if (RepairList != null) { RepairList.Clear(); } if (this._parsedMapDataList != null) { this._parsedMapDataList.Clear(); } }
private void AddRepair() { Repair rep = new Repair(); rep.Tour = this.Tour; this.Tour.Repair.Add(rep); DataServiceRepair dsRep = new DataServiceRepair(); dsRep.addRepair(rep); RepairList.Add(rep); }
public async Task DeleteRepair(object repair) { var rep = repair as RepairModel; if (rep == null) { return; } await _repairsManager.RemoveRepair(rep.ArchitectureId, rep.RestorationKind, rep.RestorationDate); RepairList.Remove(rep); }
public ActionResult History() { var list = new RepairList(); if (Request.IsAjaxRequest()) { return(Json(new { html = RenderPartialViewToString(Views.HistoryPartial, list) }, JsonRequestBehavior.AllowGet)); } return(View(Views.History, list)); }
// Update is called once per frame void Update() { ui.oxygenImage.fillAmount -= Time.deltaTime * 0.5f; if (Input.GetKeyDown(KeyCode.Space)) { RepairList.generateListOrders(7); SoundManager.PlaySound(SoundManager.EnumSound.spaceHit); //SoundManager.PlaySound(); } if (Input.GetKeyDown(KeyCode.Q)) { SoundManager.PlaySound(SoundManager.EnumSound.extincteur); } if (Input.GetKeyDown(KeyCode.W)) { SoundManager.PlaySound(SoundManager.EnumSound.hammer); } if (Input.GetKeyDown(KeyCode.E)) { SoundManager.PlaySound(SoundManager.EnumSound.menuSelectionSound); } if (Input.GetKeyDown(KeyCode.R)) { SoundManager.PlaySound(SoundManager.EnumSound.welder); } if (Input.GetKeyDown(KeyCode.T)) { SoundManager.PlaySound(SoundManager.EnumSound.wrench); } if (Input.GetKeyDown(KeyCode.Alpha2)) { uiGame.SetHighLigthActive(RequireListTool.Extincteur); Debug.Log("im press?"); } if (Input.GetKeyDown(KeyCode.Alpha1)) { uiGame.SetHighLigthActive(RequireListTool.Hammer); Debug.Log("im press?"); } if (Input.GetKeyDown(KeyCode.Alpha3)) { uiGame.SetHighLigthActive(RequireListTool.Welder); Debug.Log("im press?"); } if (Input.GetKeyDown(KeyCode.Alpha4)) { uiGame.SetHighLigthActive(RequireListTool.Wrench); Debug.Log("im press?"); } }
private int checkLocalFileMD5() { UpdateLog.DEBUG_LOG("检查本地文件md5+++"); int count = this._parsedMapDataList.Count; this._checkedCount = 0; for (int i = 0; i < this._parsedMapDataList.Count; i++) { this._checkedCount++; MapFileData item = this._parsedMapDataList[i]; string path = BaseFlow._storeDir + "/" + item.Dir + item.Name; if (item.Name.ToLower().IndexOf("localversion.xml") == -1 || item.Name.ToLower().IndexOf("resourceassetbundles") == -1) { string str2 = BaseFlow._appDir + "/" + item.Dir + item.Name; if (File.Exists(path) || File.Exists(str2)) { string str3 = MD5.MD5File(path); if (string.IsNullOrEmpty(str3)) { str3 = MD5.MD5File(str2); } if (!(!str3.Equals("") && item.Md5.Equals(str3))) { RepairList.Add(item); } } else { if (item.Name.ToLower().IndexOf("resourceassetbundles") == -1) { RepairList.Add(item); continue; //后台下载(是否后台下载) _backDownloadDict.Add(path, item); this.BackDownloadList.Add(item); } } } } if (this._checkedCount > 0) { UpdateLog.WARN_LOG("需要下载文件"); } MapFileDataListForDownload = RepairList; UpdateLog.DEBUG_LOG("检查本地文件md5---"); return(1); }
public void FilterCollection(string filteringSubstring) { filteringSubstring = filteringSubstring.Trim().ToLower(); if (string.IsNullOrEmpty(filteringSubstring)) { FilteredRepairsList.Clear(); return; } FilteredRepairsList = RepairList.Where(x => x.RestorationKind.ToString() .ToLower().Contains(filteringSubstring) || x.Architecture.Title.ToLower() .Contains(filteringSubstring)).ToList(); }
public Car_AddEdit(Car car) { InitializeComponent(); _car = car; diagCardList = DiagCardList.getInstance(); driverCarList = DriverCarList.getInstance(); driverList = DriverList.getInstance(); dtpList = DTPList.getInstance(); invoiceList = InvoiceList.getInstance(); mileageList = MileageList.getInstance(); policyList = PolicyList.getInstance(); repairList = RepairList.getInstance(); violationList = ViolationList.getInstance(); shipPartList = ShipPartList.getInstance(); }
public DialogResult ShowDialog(Car car) { _car = car; InitializeComponent(); _diagCardList = DiagCardList.getInstance(); _driverCarList = DriverCarList.getInstance(); _driverList = DriverList.getInstance(); _dtpList = DTPList.getInstance(); _invoiceList = InvoiceList.getInstance(); _mileageList = MileageList.getInstance(); _policyList = PolicyList.getInstance(); _repairList = RepairList.getInstance(); _violationList = ViolationList.getInstance(); _shipPartList = ShipPartList.getInstance(); return(ShowDialog()); }
public ActionResult Detail(int id) { var model = Repair.Get(UserID, Employee.ID, id); var login = Login.Get(UserID); model.ViewInternalNote = login.Type == LoginType.Mechanic || login.Type == LoginType.Office || login.Username == "admin"; if (Request.IsAjaxRequest()) { return(Json(new { html = RenderPartialViewToString(Views.Detail, model) }, JsonRequestBehavior.AllowGet)); } var list = new RepairList(); list.Current = model; return(View(Views.History, list)); }
public ActionResult Update(int id) { var model = Repair.Get(UserID, Employee.ID, id); model.Edit = true; var login = Login.Get(UserID); model.Editable = login.Type == LoginType.Office || login.Username == "admin"; if (Request.IsAjaxRequest()) { return(Json(new { html = RenderPartialViewToString("Edit", model) }, JsonRequestBehavior.AllowGet)); } var list = new RepairList(); list.Current = model; return(View(Views.History, list)); }
public async Task <RepairList> Insert(RepairList repair) { var model = await _repository.InsertAsync(repair); var info = new RepairListInfo() { ListId = model.Id, Remake = repair.Remake, Status = (int)RepairStatusEnum.Init }; await _infoRepository.InsertAsync(info); var comm = await _communityRepository.FirstOrDefultAsync(p => p.Id == repair.CommunityId); if (comm.AdminId != 0) { var admin = await _userRepository.FirstOrDefultAsync(p => p.Id == comm.AdminId); SmsHelper.sendAdminMsg(admin.Mobile, new { }); } return(model); }
public Task <int> DeleteAsync(RepairList entity) { return(_repository.DeleteAsync(entity)); }
/// <summary> /// 根据实体删除 /// </summary> /// <param name="entity">实体对象</param> /// <returns>操作影响的行数</returns> public int Delete(RepairList entity) { return(_repository.Delete(entity)); }
public Task <int> UpdateAsync(RepairList entity, string[] ignoreColumns = null) { return(_repository.UpdateAsync(entity, ignoreColumns)); }
/// <summary> /// 修改(主键是更新条件) /// </summary> /// <param name="entity"> 实体对象(必须指定主键特性 [SugarColumn(IsPrimaryKey=true)])</param> /// <param name="ignoreColumns">不更新的列</param> /// <returns>操作影响的行数</returns> public int Update(RepairList entity, string[] ignoreColumns = null) { return(_repository.Update(entity, ignoreColumns)); }
public Task <RepairList> InsertReturnEntityAsync(RepairList entity) { return(_repository.InsertReturnEntityAsync(entity)); }
/// <summary> /// 新增并返回实体 /// </summary> /// <returns>操作影响的行数</returns> public RepairList InsertReturnEntity(RepairList entity) { return(_repository.InsertReturnEntity(entity)); }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } if (ele.TryPathTo("Script", false, out subEle)) { if (Script == null) { Script = new RecordReference(); } Script.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectEffect", false, out subEle)) { if (ObjectEffect == null) { ObjectEffect = new RecordReference(); } ObjectEffect.ReadXML(subEle, master); } if (ele.TryPathTo("BipedData", false, out subEle)) { if (BipedData == null) { BipedData = new BipedData(); } BipedData.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Male/FileName", false, out subEle)) { if (MaleBipedModelFileName == null) { MaleBipedModelFileName = new SimpleSubrecord <String>(); } MaleBipedModelFileName.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Male/TextureHashes", false, out subEle)) { if (MaleBipedModelTextureHashes == null) { MaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>(); } MaleBipedModelTextureHashes.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Male/AlternateTextures", false, out subEle)) { if (MaleBipedModelAlternateTextures == null) { MaleBipedModelAlternateTextures = new AlternateTextures(); } MaleBipedModelAlternateTextures.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Male/FaceGenModelFlags", false, out subEle)) { if (MaleBipedModelFaceGenModelFlags == null) { MaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>(); } MaleBipedModelFaceGenModelFlags.ReadXML(subEle, master); } if (ele.TryPathTo("Models/World/Male/FileName", false, out subEle)) { if (MaleWorldModelFileName == null) { MaleWorldModelFileName = new SimpleSubrecord <String>(); } MaleWorldModelFileName.ReadXML(subEle, master); } if (ele.TryPathTo("Models/World/Male/TextureHashes", false, out subEle)) { if (MaleWorldModelTextureHashes == null) { MaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>(); } MaleWorldModelTextureHashes.ReadXML(subEle, master); } if (ele.TryPathTo("Models/World/Male/AlternateTextures", false, out subEle)) { if (MaleWorldModelAlternateTextures == null) { MaleWorldModelAlternateTextures = new AlternateTextures(); } MaleWorldModelAlternateTextures.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Inventory/Male", false, out subEle)) { if (MaleInventoryIcon == null) { MaleInventoryIcon = new SimpleSubrecord <String>(); } MaleInventoryIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Message/Male", false, out subEle)) { if (MaleMessageIcon == null) { MaleMessageIcon = new SimpleSubrecord <String>(); } MaleMessageIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Female/FileName", false, out subEle)) { if (FemaleBipedModelFileName == null) { FemaleBipedModelFileName = new SimpleSubrecord <String>(); } FemaleBipedModelFileName.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Female/TextureHashes", false, out subEle)) { if (FemaleBipedModelTextureHashes == null) { FemaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>(); } FemaleBipedModelTextureHashes.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Female/AlternateTextures", false, out subEle)) { if (FemaleBipedModelAlternateTextures == null) { FemaleBipedModelAlternateTextures = new AlternateTextures(); } FemaleBipedModelAlternateTextures.ReadXML(subEle, master); } if (ele.TryPathTo("Models/Biped/Female/FaceGenModelFlags", false, out subEle)) { if (FemaleBipedModelFaceGenModelFlags == null) { FemaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>(); } FemaleBipedModelFaceGenModelFlags.ReadXML(subEle, master); } if (ele.TryPathTo("Models/World/Female/FileName", false, out subEle)) { if (FemaleWorldModelFileName == null) { FemaleWorldModelFileName = new SimpleSubrecord <String>(); } FemaleWorldModelFileName.ReadXML(subEle, master); } if (ele.TryPathTo("Models/World/Female/TextureHashes", false, out subEle)) { if (FemaleWorldModelTextureHashes == null) { FemaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>(); } FemaleWorldModelTextureHashes.ReadXML(subEle, master); } if (ele.TryPathTo("Models/World/Female/AlternateTextures", false, out subEle)) { if (FemaleWorldModelAlternateTextures == null) { FemaleWorldModelAlternateTextures = new AlternateTextures(); } FemaleWorldModelAlternateTextures.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Inventory/Female", false, out subEle)) { if (FemaleInventoryIcon == null) { FemaleInventoryIcon = new SimpleSubrecord <String>(); } FemaleInventoryIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Message/Female", false, out subEle)) { if (FemaleMessageIcon == null) { FemaleMessageIcon = new SimpleSubrecord <String>(); } FemaleMessageIcon.ReadXML(subEle, master); } if (ele.TryPathTo("RagdollConstraintTemplate", false, out subEle)) { if (RagdollConstraintTemplate == null) { RagdollConstraintTemplate = new SimpleSubrecord <String>(); } RagdollConstraintTemplate.ReadXML(subEle, master); } if (ele.TryPathTo("RepairList", false, out subEle)) { if (RepairList == null) { RepairList = new RecordReference(); } RepairList.ReadXML(subEle, master); } if (ele.TryPathTo("BipedModelList", false, out subEle)) { if (BipedModelList == null) { BipedModelList = new RecordReference(); } BipedModelList.ReadXML(subEle, master); } if (ele.TryPathTo("EquipmentType", false, out subEle)) { if (EquipmentType == null) { EquipmentType = new SimpleSubrecord <EquipmentType>(); } EquipmentType.ReadXML(subEle, master); } if (ele.TryPathTo("PickupSound", false, out subEle)) { if (PickupSound == null) { PickupSound = new RecordReference(); } PickupSound.ReadXML(subEle, master); } if (ele.TryPathTo("DropSound", false, out subEle)) { if (DropSound == null) { DropSound = new RecordReference(); } DropSound.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new ArmorData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("ExtraData", false, out subEle)) { if (ExtraData == null) { ExtraData = new ArmorExtraData(); } ExtraData.ReadXML(subEle, master); } if (ele.TryPathTo("OverridesAnimationSounds", false, out subEle)) { if (OverridesAnimationSounds == null) { OverridesAnimationSounds = new SimpleSubrecord <NoYes>(); } OverridesAnimationSounds.ReadXML(subEle, master); } if (ele.TryPathTo("AnimationSounds", false, out subEle)) { if (AnimationSounds == null) { AnimationSounds = new List <AnimationSound>(); } foreach (XElement e in subEle.Elements()) { AnimationSound tempSNAM = new AnimationSound(); tempSNAM.ReadXML(e, master); AnimationSounds.Add(tempSNAM); } } if (ele.TryPathTo("AnimationSoundsTemplate", false, out subEle)) { if (AnimationSoundsTemplate == null) { AnimationSoundsTemplate = new RecordReference(); } AnimationSoundsTemplate.ReadXML(subEle, master); } }
public override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (EditorID != null) { ele.TryPathTo("EditorID", true, out subEle); EditorID.WriteXML(subEle, master); } if (ObjectBounds != null) { ele.TryPathTo("ObjectBounds", true, out subEle); ObjectBounds.WriteXML(subEle, master); } if (Name != null) { ele.TryPathTo("Name", true, out subEle); Name.WriteXML(subEle, master); } if (Script != null) { ele.TryPathTo("Script", true, out subEle); Script.WriteXML(subEle, master); } if (ObjectEffect != null) { ele.TryPathTo("ObjectEffect", true, out subEle); ObjectEffect.WriteXML(subEle, master); } if (BipedData != null) { ele.TryPathTo("BipedData", true, out subEle); BipedData.WriteXML(subEle, master); } if (MaleBipedModelFileName != null) { ele.TryPathTo("Models/Biped/Male/FileName", true, out subEle); MaleBipedModelFileName.WriteXML(subEle, master); } if (MaleBipedModelTextureHashes != null) { ele.TryPathTo("Models/Biped/Male/TextureHashes", true, out subEle); MaleBipedModelTextureHashes.WriteXML(subEle, master); } if (MaleBipedModelAlternateTextures != null) { ele.TryPathTo("Models/Biped/Male/AlternateTextures", true, out subEle); MaleBipedModelAlternateTextures.WriteXML(subEle, master); } if (MaleBipedModelFaceGenModelFlags != null) { ele.TryPathTo("Models/Biped/Male/FaceGenModelFlags", true, out subEle); MaleBipedModelFaceGenModelFlags.WriteXML(subEle, master); } if (MaleWorldModelFileName != null) { ele.TryPathTo("Models/World/Male/FileName", true, out subEle); MaleWorldModelFileName.WriteXML(subEle, master); } if (MaleWorldModelTextureHashes != null) { ele.TryPathTo("Models/World/Male/TextureHashes", true, out subEle); MaleWorldModelTextureHashes.WriteXML(subEle, master); } if (MaleWorldModelAlternateTextures != null) { ele.TryPathTo("Models/World/Male/AlternateTextures", true, out subEle); MaleWorldModelAlternateTextures.WriteXML(subEle, master); } if (MaleInventoryIcon != null) { ele.TryPathTo("Icon/Inventory/Male", true, out subEle); MaleInventoryIcon.WriteXML(subEle, master); } if (MaleMessageIcon != null) { ele.TryPathTo("Icon/Message/Male", true, out subEle); MaleMessageIcon.WriteXML(subEle, master); } if (FemaleBipedModelFileName != null) { ele.TryPathTo("Models/Biped/Female/FileName", true, out subEle); FemaleBipedModelFileName.WriteXML(subEle, master); } if (FemaleBipedModelTextureHashes != null) { ele.TryPathTo("Models/Biped/Female/TextureHashes", true, out subEle); FemaleBipedModelTextureHashes.WriteXML(subEle, master); } if (FemaleBipedModelAlternateTextures != null) { ele.TryPathTo("Models/Biped/Female/AlternateTextures", true, out subEle); FemaleBipedModelAlternateTextures.WriteXML(subEle, master); } if (FemaleBipedModelFaceGenModelFlags != null) { ele.TryPathTo("Models/Biped/Female/FaceGenModelFlags", true, out subEle); FemaleBipedModelFaceGenModelFlags.WriteXML(subEle, master); } if (FemaleWorldModelFileName != null) { ele.TryPathTo("Models/World/Female/FileName", true, out subEle); FemaleWorldModelFileName.WriteXML(subEle, master); } if (FemaleWorldModelTextureHashes != null) { ele.TryPathTo("Models/World/Female/TextureHashes", true, out subEle); FemaleWorldModelTextureHashes.WriteXML(subEle, master); } if (FemaleWorldModelAlternateTextures != null) { ele.TryPathTo("Models/World/Female/AlternateTextures", true, out subEle); FemaleWorldModelAlternateTextures.WriteXML(subEle, master); } if (FemaleInventoryIcon != null) { ele.TryPathTo("Icon/Inventory/Female", true, out subEle); FemaleInventoryIcon.WriteXML(subEle, master); } if (FemaleMessageIcon != null) { ele.TryPathTo("Icon/Message/Female", true, out subEle); FemaleMessageIcon.WriteXML(subEle, master); } if (RagdollConstraintTemplate != null) { ele.TryPathTo("RagdollConstraintTemplate", true, out subEle); RagdollConstraintTemplate.WriteXML(subEle, master); } if (RepairList != null) { ele.TryPathTo("RepairList", true, out subEle); RepairList.WriteXML(subEle, master); } if (BipedModelList != null) { ele.TryPathTo("BipedModelList", true, out subEle); BipedModelList.WriteXML(subEle, master); } if (EquipmentType != null) { ele.TryPathTo("EquipmentType", true, out subEle); EquipmentType.WriteXML(subEle, master); } if (PickupSound != null) { ele.TryPathTo("PickupSound", true, out subEle); PickupSound.WriteXML(subEle, master); } if (DropSound != null) { ele.TryPathTo("DropSound", true, out subEle); DropSound.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (ExtraData != null) { ele.TryPathTo("ExtraData", true, out subEle); ExtraData.WriteXML(subEle, master); } if (OverridesAnimationSounds != null) { ele.TryPathTo("OverridesAnimationSounds", true, out subEle); OverridesAnimationSounds.WriteXML(subEle, master); } if (AnimationSounds != null) { ele.TryPathTo("AnimationSounds", true, out subEle); List <string> xmlNames = new List <string> { "Sound" }; int i = 0; foreach (var entry in AnimationSounds) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (AnimationSoundsTemplate != null) { ele.TryPathTo("AnimationSoundsTemplate", true, out subEle); AnimationSoundsTemplate.WriteXML(subEle, master); } }
/// <summary> /// 新增 /// </summary> /// <returns>操作影响的行数</returns> public int Insert(RepairList entity) { return(_repository.Insert(entity)); }
public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadBinary(reader); break; case "OBND": if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadBinary(reader); break; case "FULL": if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadBinary(reader); break; case "SCRI": if (Script == null) { Script = new RecordReference(); } Script.ReadBinary(reader); break; case "EITM": if (ObjectEffect == null) { ObjectEffect = new RecordReference(); } ObjectEffect.ReadBinary(reader); break; case "BMDT": if (BipedData == null) { BipedData = new BipedData(); } BipedData.ReadBinary(reader); break; case "MODL": if (MaleBipedModelFileName == null) { MaleBipedModelFileName = new SimpleSubrecord <String>(); } MaleBipedModelFileName.ReadBinary(reader); break; case "MODT": if (MaleBipedModelTextureHashes == null) { MaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>(); } MaleBipedModelTextureHashes.ReadBinary(reader); break; case "MODS": if (MaleBipedModelAlternateTextures == null) { MaleBipedModelAlternateTextures = new AlternateTextures(); } MaleBipedModelAlternateTextures.ReadBinary(reader); break; case "MODD": if (MaleBipedModelFaceGenModelFlags == null) { MaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>(); } MaleBipedModelFaceGenModelFlags.ReadBinary(reader); break; case "MOD2": if (MaleWorldModelFileName == null) { MaleWorldModelFileName = new SimpleSubrecord <String>(); } MaleWorldModelFileName.ReadBinary(reader); break; case "MO2T": if (MaleWorldModelTextureHashes == null) { MaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>(); } MaleWorldModelTextureHashes.ReadBinary(reader); break; case "MO2S": if (MaleWorldModelAlternateTextures == null) { MaleWorldModelAlternateTextures = new AlternateTextures(); } MaleWorldModelAlternateTextures.ReadBinary(reader); break; case "ICON": if (MaleInventoryIcon == null) { MaleInventoryIcon = new SimpleSubrecord <String>(); } MaleInventoryIcon.ReadBinary(reader); break; case "MICO": if (MaleMessageIcon == null) { MaleMessageIcon = new SimpleSubrecord <String>(); } MaleMessageIcon.ReadBinary(reader); break; case "MOD3": if (FemaleBipedModelFileName == null) { FemaleBipedModelFileName = new SimpleSubrecord <String>(); } FemaleBipedModelFileName.ReadBinary(reader); break; case "MO3T": if (FemaleBipedModelTextureHashes == null) { FemaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>(); } FemaleBipedModelTextureHashes.ReadBinary(reader); break; case "MO3S": if (FemaleBipedModelAlternateTextures == null) { FemaleBipedModelAlternateTextures = new AlternateTextures(); } FemaleBipedModelAlternateTextures.ReadBinary(reader); break; case "MOSD": if (FemaleBipedModelFaceGenModelFlags == null) { FemaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>(); } FemaleBipedModelFaceGenModelFlags.ReadBinary(reader); break; case "MOD4": if (FemaleWorldModelFileName == null) { FemaleWorldModelFileName = new SimpleSubrecord <String>(); } FemaleWorldModelFileName.ReadBinary(reader); break; case "MO4T": if (FemaleWorldModelTextureHashes == null) { FemaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>(); } FemaleWorldModelTextureHashes.ReadBinary(reader); break; case "MO4S": if (FemaleWorldModelAlternateTextures == null) { FemaleWorldModelAlternateTextures = new AlternateTextures(); } FemaleWorldModelAlternateTextures.ReadBinary(reader); break; case "ICO2": if (FemaleInventoryIcon == null) { FemaleInventoryIcon = new SimpleSubrecord <String>(); } FemaleInventoryIcon.ReadBinary(reader); break; case "MIC2": if (FemaleMessageIcon == null) { FemaleMessageIcon = new SimpleSubrecord <String>(); } FemaleMessageIcon.ReadBinary(reader); break; case "BMCT": if (RagdollConstraintTemplate == null) { RagdollConstraintTemplate = new SimpleSubrecord <String>(); } RagdollConstraintTemplate.ReadBinary(reader); break; case "REPL": if (RepairList == null) { RepairList = new RecordReference(); } RepairList.ReadBinary(reader); break; case "BIPL": if (BipedModelList == null) { BipedModelList = new RecordReference(); } BipedModelList.ReadBinary(reader); break; case "ETYP": if (EquipmentType == null) { EquipmentType = new SimpleSubrecord <EquipmentType>(); } EquipmentType.ReadBinary(reader); break; case "YNAM": if (PickupSound == null) { PickupSound = new RecordReference(); } PickupSound.ReadBinary(reader); break; case "ZNAM": if (DropSound == null) { DropSound = new RecordReference(); } DropSound.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new ArmorData(); } Data.ReadBinary(reader); break; case "DNAM": if (ExtraData == null) { ExtraData = new ArmorExtraData(); } ExtraData.ReadBinary(reader); break; case "BNAM": if (OverridesAnimationSounds == null) { OverridesAnimationSounds = new SimpleSubrecord <NoYes>(); } OverridesAnimationSounds.ReadBinary(reader); break; case "SNAM": if (AnimationSounds == null) { AnimationSounds = new List <AnimationSound>(); } AnimationSound tempSNAM = new AnimationSound(); tempSNAM.ReadBinary(reader); AnimationSounds.Add(tempSNAM); break; case "TNAM": if (AnimationSoundsTemplate == null) { AnimationSoundsTemplate = new RecordReference(); } AnimationSoundsTemplate.ReadBinary(reader); break; default: throw new Exception(); } } }
public Task <int> InsertAsync(RepairList entity) { return(_repository.InsertAsync(entity)); }
public override void WriteData(ESPWriter writer) { if (EditorID != null) { EditorID.WriteBinary(writer); } if (ObjectBounds != null) { ObjectBounds.WriteBinary(writer); } if (Name != null) { Name.WriteBinary(writer); } if (Script != null) { Script.WriteBinary(writer); } if (ObjectEffect != null) { ObjectEffect.WriteBinary(writer); } if (BipedData != null) { BipedData.WriteBinary(writer); } if (MaleBipedModelFileName != null) { MaleBipedModelFileName.WriteBinary(writer); } if (MaleBipedModelTextureHashes != null) { MaleBipedModelTextureHashes.WriteBinary(writer); } if (MaleBipedModelAlternateTextures != null) { MaleBipedModelAlternateTextures.WriteBinary(writer); } if (MaleBipedModelFaceGenModelFlags != null) { MaleBipedModelFaceGenModelFlags.WriteBinary(writer); } if (MaleWorldModelFileName != null) { MaleWorldModelFileName.WriteBinary(writer); } if (MaleWorldModelTextureHashes != null) { MaleWorldModelTextureHashes.WriteBinary(writer); } if (MaleWorldModelAlternateTextures != null) { MaleWorldModelAlternateTextures.WriteBinary(writer); } if (MaleInventoryIcon != null) { MaleInventoryIcon.WriteBinary(writer); } if (MaleMessageIcon != null) { MaleMessageIcon.WriteBinary(writer); } if (FemaleBipedModelFileName != null) { FemaleBipedModelFileName.WriteBinary(writer); } if (FemaleBipedModelTextureHashes != null) { FemaleBipedModelTextureHashes.WriteBinary(writer); } if (FemaleBipedModelAlternateTextures != null) { FemaleBipedModelAlternateTextures.WriteBinary(writer); } if (FemaleBipedModelFaceGenModelFlags != null) { FemaleBipedModelFaceGenModelFlags.WriteBinary(writer); } if (FemaleWorldModelFileName != null) { FemaleWorldModelFileName.WriteBinary(writer); } if (FemaleWorldModelTextureHashes != null) { FemaleWorldModelTextureHashes.WriteBinary(writer); } if (FemaleWorldModelAlternateTextures != null) { FemaleWorldModelAlternateTextures.WriteBinary(writer); } if (FemaleInventoryIcon != null) { FemaleInventoryIcon.WriteBinary(writer); } if (FemaleMessageIcon != null) { FemaleMessageIcon.WriteBinary(writer); } if (RagdollConstraintTemplate != null) { RagdollConstraintTemplate.WriteBinary(writer); } if (RepairList != null) { RepairList.WriteBinary(writer); } if (BipedModelList != null) { BipedModelList.WriteBinary(writer); } if (EquipmentType != null) { EquipmentType.WriteBinary(writer); } if (PickupSound != null) { PickupSound.WriteBinary(writer); } if (DropSound != null) { DropSound.WriteBinary(writer); } if (Data != null) { Data.WriteBinary(writer); } if (ExtraData != null) { ExtraData.WriteBinary(writer); } if (OverridesAnimationSounds != null) { OverridesAnimationSounds.WriteBinary(writer); } if (AnimationSounds != null) { foreach (var item in AnimationSounds) { item.WriteBinary(writer); } } if (AnimationSoundsTemplate != null) { AnimationSoundsTemplate.WriteBinary(writer); } }