コード例 #1
0
        public List<ResultMessages> VehicleDerigistration(Deregistration newDereg, string username, string password, string InternalId)
        {
            List<ResultMessages> results = new List<ResultMessages>();
            ResultMessages message = new ResultMessages();
            List<Guid> allowedCustomers = new List<Guid>();
            XMLHelper orderHelper = new XMLHelper();

            allowedCustomers = CheckLogin.CheckUser(username, password, InternalId);
            if (allowedCustomers.Count > 0)
            {
                using (DataClasses1DataContext dbContext = new DataClasses1DataContext(new Guid(ConfigurationManager.AppSettings["currentUser"])))
                {
                    try
                    {
                        dbContext.WriteLogItem("Zugriff von der IP Adresse: " + this.Context.Request.UserHostAddress + "Webservice VehicleDeregestration()", LogTypes.INFO);
                        string file = orderHelper.XmlSerializeAndSave(newDereg, OrderTypes.VehicleDeregistration);

                        if (File.Exists(file))
                        {
                            ValidateOrderType.ValidateAndSaveDerigistration(newDereg, dbContext, out results);
                        }
                        else
                        {
                            throw new Exception(file);
                        }
                    }

                    catch (Exception ex)
                    {
                       message.Error="Fehler beim verabeiten der Daten, bitte wiederholen Sie den Vorgang" + Environment.NewLine + "Fehlermeldung: " + ex.Message;
                       results.Add(message);
                    }
                }
            }

            return results;
        }
コード例 #2
0
ファイル: Configurations.cs プロジェクト: MuteG/readerme
 private Configurations(string filePath)
 {
     m_Xml = new XMLHelper(filePath);
     ReadConig();
 }