Ejemplo n.º 1
0
 public DebitorViewModel(Debitor debitor)
 {
     Debitor_     = debitor;
     debts_       = new ObservableCollection <Debt>(Debitor_.Debts_);
     newDebtName  = "Name";
     newDebtValue = "0";
 }
Ejemplo n.º 2
0
        public static Debitor CreateDebitor(int intDebitorId, string strDebitorNumber, int intPortalId, string xmlDetailsSerialized, string strCreateUser, string strModifyUser, global::System.DateTime dtmCreateDate, global::System.DateTime dtmModifyDate)
        {
            Debitor debitor = new Debitor();

            debitor.intDebitorId         = intDebitorId;
            debitor.strDebitorNumber     = strDebitorNumber;
            debitor.intPortalId          = intPortalId;
            debitor.xmlDetailsSerialized = xmlDetailsSerialized;
            debitor.strCreateUser        = strCreateUser;
            debitor.strModifyUser        = strModifyUser;
            debitor.dtmCreateDate        = dtmCreateDate;
            debitor.dtmModifyDate        = dtmModifyDate;
            return(debitor);
        }
Ejemplo n.º 3
0
        public static List <Abonnement> GenererTestAbonnement(string vareNummer, decimal vareSalgsPris, decimal vareAntal, string debitorNummer, decimal?abonnentPrisIndex, decimal?abonnentSpecialPris, decimal?abonnentRabat, DateTime?abonnentRabatUdloeb, DateTime abonnentStart, DateTime abonnentSlut, DateTime?abonnentUloeb, string abonnementInterval, string abonnementOpkraevning, bool abonnementKalenderAar)
        {
            List <Abonnement> abonnementer = new List <Abonnement>();

            Vare       produkt    = new Vare(0, null, vareNummer, vareSalgsPris, 0, null);
            Varelinje  varelinje  = new Varelinje(0, 0, vareAntal, null, produkt, null);
            Debitor    debitor    = new Debitor(null, 0, null, null, null, null, null, null, null, debitorNummer, null, null);
            Abonnent   abonnent   = new Abonnent(0, debitor, abonnentRabat, abonnentRabatUdloeb, abonnentSlut, abonnentUloeb, null, abonnentPrisIndex, DateTime.MinValue, abonnentSpecialPris, abonnentStart);
            Abonnement abonnement = new Abonnement(0, null, 0, abonnementKalenderAar, abonnementInterval, abonnementOpkraevning);

            abonnement.Varelinjer.Add(varelinje);
            abonnement.Abonnenter.Add(abonnent);
            abonnementer.Add(abonnement);

            return(abonnementer);
        }
Ejemplo n.º 4
0
        //public async Task<DebitorEditViewModel> EditAsync(int? id)
        //{
        //    return await this.DetailsAsync(id);
        //}

        public async Task EditAsync(DebitorEditViewModel model)
        {
            var debitor = new Debitor
            {
                Id               = model.Id,
                FirstName        = model.FirstName,
                MiddleName       = model.MiddleName,
                LastName         = model.LastName,
                EGN              = model.EGN,
                Email            = model.Email,
                AbNumber         = model.AbNumber,
                HeatEstate       = model.HeatEstate,
                Phone            = model.Phone,
                Representative   = model.Representative,
                AddressToContact = model.AddressToContact,
            };

            this.dbContext.Debitors.Update(debitor);
            await this.dbContext.SaveChangesAsync();
        }
        private void NewItem()
        {
            CompanyViewModel.Clear();

            if (_SelectedCustomerType == CustomerType.Creditor)
            {
                SelectedCreditor = new Creditor
                {
                    Client = CompanyViewModel.Client
                };
                FilteredCreditors.Add(SelectedCreditor);
                CompanyViewModel.Client = SelectedCreditor.Client;
            }
            else
            {
                SelectedDebitor = new Debitor
                {
                    Client = CompanyViewModel.Client
                };
                FilteredDebitors.Add(SelectedDebitor);
            }
        }
Ejemplo n.º 6
0
 public void AddToJWEwolf_Debitor(Debitor debitor)
 {
     base.AddObject("JWEwolf_Debitor", debitor);
 }
Ejemplo n.º 7
0
 public static bool Update(Debitor Debitor)
 {
     return(WebApi <bool> .PutAsync(controllerName, Debitor, "Put").Result);
 }
Ejemplo n.º 8
0
 public static int Insert(Debitor Debitor)
 {
     return(WebApi <int> .PostAsync(controllerName, Debitor, "SinglePost").Result);
 }
Ejemplo n.º 9
0
 // When event is received, set values
 void RegisterDebitor(Debitor debitor)
 {
     Name  = debitor.Name;
     Debts = debitor.Debts;
     Id    = debitor.Id;
 }
Ejemplo n.º 10
0
 public static string ToJson(this Debitor self) => JsonConvert.SerializeObject(self, Teknolgisk.Converter.Settings);