public HelpService(SkillsService skillsService, SpecialService specialService, InteractiveService interactiveService) { _skillsService = skillsService; _interactiveService = interactiveService; }
private SpecialService CreateSpecialService() { var userId = Guid.Parse(User.Identity.GetUserId()); var specialService = new SpecialService(userId); return(specialService); }
/// <summary> /// 校正数据 /// </summary> void checkData() { service = service ?? new SpecialService(); try { //获取库中的模板及皮肤 dbTemplateSkins = service.GetTemplatesSkins(); //获取库中的组件及风格 dbComponentStyles = service.GetComponentsStyles(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { if (dbTemplateSkins == null) { dbTemplateSkins = new Dictionary <string, string[]>(); } if (dbComponentStyles == null) { dbComponentStyles = new Dictionary <string, string[]>(); } } //获取本地所有模板及皮肤 localTemplateSkins = GetLocationTemplatesAtSkins(); //获取本地所有组件及风格 localComponentStyles = GetLocationComponentsAtStyles(); resolveTemplates(); resolveComponents(); }
private SpecialService CreateSpecialService() { // Get product by id var specialService = new SpecialService(); return(specialService); }
public ActionResult DeleteConfirmed(string id) { SpecialService specialService = db.SpecialServices.Find(id); db.SpecialServices.Remove(specialService); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ssID,ssName,ssFare")] SpecialService specialService) { if (ModelState.IsValid) { db.Entry(specialService).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(specialService)); }
public AdminModule(CharacterService charService, SkillsService skillsService, SpecialService specialService, HelpService helpService) { _charService = charService; _skillsService = skillsService; _specialService = specialService; _helpService = helpService; }
public ActionResult Create([Bind(Include = "ssID,ssName,ssFare")] SpecialService specialService) { if (ModelState.IsValid) { db.SpecialServices.Add(specialService); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(specialService)); }
public AdminModule(CharacterService charService, ExperienceService experienceService, SkillsService skillsService, SpecialService specialService, StatisticsService statService, HelpService helpService) { _charService = charService; _experienceService = experienceService; _skillsService = skillsService; _specialService = specialService; _statService = statService; _helpService = helpService; }
// GET: SpecialServices/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SpecialService specialService = db.SpecialServices.Find(id); if (specialService == null) { return(HttpNotFound()); } return(View(specialService)); }
public RollModule( CharacterService characterService, EffectsService effectsService, HelpService helpService, NpcService npcService, RollService rollService, SpecialService specialService, Random random) { _charService = characterService; _effectsService = effectsService; _helpService = helpService; _npcService = npcService; _rollService = rollService; _specialService = specialService; _random = random; }
public void Call() { try { var request = new SpecialServiceRQ() { POS = new SpecialServiceRQPOS() { Source = new SpecialServiceRQPOSSource() { PseudoCityCode = VolarisResources.PseudoCodeCity } }, Version = VolarisResources.SpecialServiceServiceVersion }; request.Service = CreateServices(); var service = new SpecialService() { MessageHeaderValue = this.GetMessageHeader(), SecurityValue = new Security() { BinarySecurityToken = this.SecurityToken } }; Serializer.Serialize("SpecialServiceLLSRQ", request); var response = service.SpecialServiceRQ(request); Serializer.Serialize("SpecialServiceLLSRS", response); if (response.Success != null && response.Errors == null) { Success = true; } else { Success = false; ErrorMessage = "No se agregaron correctamente los servicios especiales"; } } catch (Exception exe) { Success = false; ErrorMessage = "No se agregaron correctamente los servicios especiales"; } }
public CharacterSkillsModule( CharacterService charService, EffectsService effectsService, ExperienceService expService, ProgressionOptions progOptions, RoleplayOptions roleplayOptions, SkillsService skillsService, SpecialService specService, StatisticsService statsService, HelpService helpService) { _charService = charService; _effectsService = effectsService; _expService = expService; _progOptions = progOptions; _roleplayOptions = roleplayOptions; _skillsService = skillsService; _specService = specService; _statsService = statsService; _helpService = helpService; }
public CharacterSpecialModule(CharacterService charService, SpecialService specService) { _charService = charService; _specService = specService; }
public bool AddImportNet(List <td_Network_1> list) { var service = new SpecialService(); return(service.AddImportNet(list)); }
public bool AddImport_sl(List <td_ComputerRoom_sbsl_1> list) { var service = new SpecialService(); return(service.AddImportRoom_sl(list)); }
public CheckModule(CharacterService charService, SkillsService skillsService, SpecialService specialService) { _charService = charService; _skillsService = skillsService; _specialService = specialService; }
public bool AddImport_2(List <td_Service_2> list) { var service = new SpecialService(); return(service.AddImportService_2(list)); }
private List <ShippingOption> InterpretShippingOptions(RateV4Response response, decimal minimumShippingRate) { if (response == null) { throw new ArgumentNullException(nameof(response)); } if (minimumShippingRate < 0) { throw new ArgumentOutOfRangeException(nameof(minimumShippingRate), minimumShippingRate, "minimumShippingRate must be greater than zero"); } string[] carrierServicesOffered = _uspsSettings.DomesticServicesSelected.Split(','); decimal additionalHandlingCharge = _uspsSettings.AdditionalHandlingCharge; var options = new List <ShippingOption>(); foreach (Package package in response.Packages) { // indicate a package error if there is one and skip to the next package if (package.Error != null) { options.Add(new ShippingOption { Name = package.Error.Description }); continue; } foreach (Postage postage in package.Postages) { // service doesn't match one that is enabled, move on to the next one if (!carrierServicesOffered.Contains(postage.ClassId)) { continue; } string serviceName = GetModifiedServiceName(postage.MailService); SpecialService insurance = postage.SpecialServices?.FirstOrDefault(s => s.ServiceId == "1" || s.ServiceId == "11"); decimal rate = postage.Rate + (insurance?.Price ?? 0) + additionalHandlingCharge; ShippingOption shippingOption = options.Find(o => o.Name == serviceName); // Use min shipping amount if rate is less than minimum rate = rate < minimumShippingRate ? minimumShippingRate : rate; if (shippingOption == null) { // service doesn't exist yet, so create a new one shippingOption = new ShippingOption { Name = serviceName, Rate = rate, }; options.Add(shippingOption); } else { // service is already in the list, so let's add the current postage rate to it shippingOption.Rate += rate; } } } return(options); }
public bool AddImport_sl(List <td_Security_xxsl_1> list) { var service = new SpecialService(); return(service.AddImportSecurity_sl(list)); }
public bool AddImport(List <td_GenuineSoftware_1> list) { var service = new SpecialService(); return(service.AddImportSoft(list)); }
public bool UpdateNodeButton(List <int> nodeIdList, List <int> buttonIdList) { var szServices = new SpecialService(); return(szServices.UpdateNodeButton(nodeIdList, buttonIdList)); }
static void Main(string[] args) { Configuration.Default.BasePath = "https://shipping-api-sandbox.pitneybowes.com/shippingservices"; Configuration.Default.OAuthApiKey = "<API_KEY_REPLACE>"; Configuration.Default.OAuthSecret = "<API_SECRET_REPLACE>"; DateTime dt = DateTime.Now; var apiInstance = new ShipmentApi(Configuration.Default); var xPBTransactionId = dt.Millisecond.ToString(); // string | Required. A unique identifier for the transaction, up to 25 characters. var xPBUnifiedErrorStructure = true; // bool? | Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs. (optional) (default to true) var xPBIntegratorCarrierId = "898644"; // string | USPS Only. Negotiated services rate, if applicable. (optional) //var xPBShipperRatePlan = xPBShipperRatePlan_example; // string | USPS Only. Shipper rate plan, if applicable. For more information, see [this FAQ](https://shipping.pitneybowes.com/faqs/rates.html#rate-plans-faq). (optional) //var xPBShipmentGroupId = xPBShipmentGroupId_example; // string | **[Required parameter for PBPresort service](https://shipping.pitneybowes.com/api/post-shipments-presort.html)**.The job number that represents the agreement between the merchant and PB Presort. This was provided by Pitney Bowes during [merchant onboarding for PB Presort](https://shipping.pitneybowes.com/carriers/pb-presort.html). (optional) //var xPBShipperCarrierAccountId = xPBShipperCarrierAccountId_example; // string | **[Required parameter for PBPresort service](https://shipping.pitneybowes.com/api/post-shipments-presort.html)**. The merchant's Mailer ID (MID), as provided by Pitney Bowes during merchant onboarding for PB Presort. (optional) //var includeDeliveryCommitment = includeDeliveryCommitment_example; // string | If set to true, returns estimated transit times in days. Only for USPS Create Shipment. See also [Pitney Bowes Delivery Guarantee](https://shipping.pitneybowes.com/faqs/delivery-guarantee.html) [Do all USPS services return transit times?](https://shipping.pitneybowes.com/faqs/shipments.html#transit-times-faq) (optional) try { var name1 = "Paul Wright"; var phone1 = "203-555-1430"; var email1 = "*****@*****.**"; var residential1 = false; List <string> addressLines1 = new List <string>() { "27 Waterview Dr" }; var cityTown1 = "Shelton"; var stateProvince1 = "CT"; var postalCode1 = "06484-4361"; var countryCode1 = "US"; var carrierRoute1 = "C010"; var deliveryPoint1 = "27"; var company1 = "Pitney Bowes Inc."; Address fromAddress = new Address(name: name1, phone: phone1, residential: residential1, addressLines: addressLines1, cityTown: cityTown1, stateProvince: stateProvince1, postalCode: postalCode1, countryCode: countryCode1, carrierRoute: carrierRoute1, deliveryPoint: deliveryPoint1, company: company1, email: email1); var name2 = "Rufous Sirius Canid"; var phone2 = "323 555-1212"; var email2 = "*****@*****.**"; var residential2 = true; List <string> addressLines2 = new List <string>() { "631 S Main St" }; var cityTown2 = "Greenville"; var stateProvince2 = "SC"; var postalCode2 = "29601"; var countryCode2 = "US"; var company2 = "ABC Company"; Address toAddress = new Address(name: name2, phone: phone2, residential: residential2, addressLines: addressLines2, cityTown: cityTown2, stateProvince: stateProvince2, postalCode: postalCode2, countryCode: countryCode2, company: company2, email: email2); //Parcel ParcelDimension parcelDimension = new ParcelDimension(); parcelDimension.Height = 6.000m; parcelDimension.Length = 6.000m; parcelDimension.Width = 6.000m; parcelDimension.UnitOfMeasurement = UnitOfDimension.IN; ParcelWeight parcelWeight = new ParcelWeight(38.00m, UnitOfWeight.OZ); Parcel parcel = new Parcel(parcelDimension, parcelWeight); //Rates //Specil Service SpecialService specialService = new SpecialService(specialServiceId: "DelCon", inputParameters: new List <Parameter> { new Parameter("INPUT_VALUE", "0") }); Rate rate = new Rate(carrier: Carrier.USPS, serviceId: Services.PM, parcelType: ParcelType.PKG, specialServices: new List <SpecialService>() { specialService }, inductionPostalCode: "06484"); //Documents Document document = new Document(type: "SHIPPING_LABEL", contentType: Document.ContentTypeEnum.URL, size: Document.SizeEnum._4X6, fileFormat: Document.FileFormatEnum.PDF, printDialogOption: Document.PrintDialogOptionEnum.NOPRINTDIALOG); //ShipemntOptions List <Parameter> shipmentoption = new List <Parameter> { new Parameter("SHIPPER_ID", "9025037569"), new Parameter("ADD_TO_MANIFEST", "true"), new Parameter("HIDE_TOTAL_CARRIER_CHARGE", "true"), new Parameter("PRINT_CUSTOM_MESSAGE_1", "custom message for label"), new Parameter("SHIPPING_LABEL_RECEIPT", "NO_OPTIONS") }; var shipment = new Shipment(fromAddress: fromAddress, toAddress: toAddress, parcel: parcel, rates: new List <Rate>() { rate }, documents: new List <Document>() { document }, shipmentOptions: shipmentoption); // Shipment | request // This operation creates a shipment and purchases a shipment label. Shipment result = apiInstance.CreateShipmentLabel(xPBTransactionId, shipment, xPBUnifiedErrorStructure, xPBIntegratorCarrierId); // Console.WriteLine((new System.Collections.Generic.ICollectionDebugView<shippingapi.Model.Document>(result.Documents).Items[0]).Contents); Console.WriteLine(result.Documents[0].Contents); } catch (ApiException e) { Debug.Print("Exception when calling ShipmentApi.CreateShipmentLabel: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } }