//private void CreateDownPartnerChooserIfNotExists() //{ // //if (downPaymentViewModel != null) return; // downPaymentViewModel = new DownPaymentViewModel(asNotrack : true); // downPaymentViewModel.OnSelect += GetSelectedDownPayment; // downPaymentViewModel.OnClose += () => IsModalVisible = false; //} private void GetSelectedDownPayment(ODPI_DownPayment selectedDownPayment) { IsModalVisible = false; //Customer Name. SelectedDownPayment = selectedDownPayment; RaisePropertyChanged("SelectedSale"); }
public static void Delete(ODPI_DownPayment selectedDownPayment) { lock (Extensions.Locker) { var db = ContextFactory.GetDBContext(); db.ODPI_DownPayment.Remove(selectedDownPayment); } }
public static ODPI_DownPayment ForceUpdateToDataBase(this ODPI_DownPayment downPayment) { lock (Extensions.Locker) { var db = ContextFactory.GetDBContext(); return(db.ODPI_DownPayment.Find(downPayment.IdDownPayment)); } }
private static ODPI_DownPayment SyncUpload(ODPI_DownPayment downPayment) { var result = WebApiClient.AddDownPayment(downPayment).Result; downPayment.UpdateModelPropertiesFrom(result.Model); downPayment.StateL = LocalStatus.Procesado; result.UpdateEntityVersion(); return(downPayment); }
public override void ExecuteNewCommand() { SelectedDownPayment = null; SelectedPartner = null; SelectedDownPayment = new ODPI_DownPayment(); Serie = null; DownPaymentDetailsCollection = null; FormTitle = "Nuevo Detalle de Anticipo"; ShowDialog(new DownPaymentView(), this, resizeMode: ResizeMode.CanResize); }
public static ODPI_DownPayment Synchronize(ODPI_DownPayment model) { CheckForUpdates();// Actualizar cambios antes de subir y verificar si el objeto no fue ya procesado model = DownPaymentHelper.Get(model.IdDownPayment); if (model.StateL != LocalStatus.Procesado) { return(model.Upload(SyncUpload)); } else { return(model); } }
public static void Add(ODPI_DownPayment downpayment) { lock (Extensions.Locker) { var db = ContextFactory.GetDBContext(); if (downpayment.IdDownPayment == 0) { db.ODPI_DownPayment.Add(downpayment); } else { downpayment.ModifiedByL = Config.CurrentUser; downpayment.ModifiedDateL = DateTime.Now; } } }
public static Task <Synchro <ODPI_DownPayment> > AddDownPayment(ODPI_DownPayment downPayment) { return(PostAsync <ODPI_DownPayment, Synchro <ODPI_DownPayment> >("api/DownPayments", downPayment)); }