Ejemplo n.º 1
0
        public RevisiTanggal(Context.RevisiTanggal dbitem)
        {
            Id           = dbitem.Id;
            IdSalesOrder = dbitem.IdSalesOrder;

            if (dbitem.SalesOrder.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem.SalesOrder);
                TanggalLama = ModelOncall.TanggalMuat;
                JamLama     = ModelOncall.JamMuat;
            }
            else if (dbitem.SalesOrder.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem.SalesOrder);
                TanggalLama = ModelPickup.TanggalPickup;
                JamLama     = ModelPickup.JamPickup;
            }
            else if (dbitem.SalesOrder.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem.SalesOrder);
                TanggalLama      = ModelKonsolidasi.TanggalMuat;
                JamLama          = ModelKonsolidasi.JamMuat;
            }
            TanggalBaru      = dbitem.TanggalMuat;
            JamBaru          = dbitem.JamMuat;
            KeteranganRevisi = KeteranganRevisi;
        }
Ejemplo n.º 2
0
        public RevisiRute(Context.SalesOrder dbitem)
        {
            IdSalesOrder = dbitem.Id;

            if (dbitem.SalesOrderOncallId.HasValue)
            {
                ModelOncall   = new SalesOrderOncall(dbitem);
                RuteLama      = ModelOncall.Rute;
                MultidropLama = ModelOncall.StrMultidrop;
                ListLoad      = ModelOncall.ListLoad;
                ListUnload    = ModelOncall.ListUnload;
            }
            else if (dbitem.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem);
                RuteLama    = ModelPickup.Rute;
                ListLoad    = ModelPickup.ListLoad;
                ListUnload  = ModelPickup.ListUnload;
            }
            else if (dbitem.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem);
                RuteLama         = ModelKonsolidasi.Rute;
            }
        }
Ejemplo n.º 3
0
        public RevisiKeterangan(Context.SalesOrder dbitem)
        {
            IdSalesOrder = dbitem.Id;

            if (dbitem.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem);
            }
            else if (dbitem.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem);
            }
            else if (dbitem.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem);
            }
        }
Ejemplo n.º 4
0
        public SettlementBatal(Context.SettlementBatal dbitem)
        {
            Id           = dbitem.Id;
            IdSalesOrder = dbitem.IdSalesOrder;

            if (dbitem.SalesOrder.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem.SalesOrder);
            }
            KasDiterima        = dbitem.KasDiterima;
            TransferDiterima   = dbitem.TransferDiterima;
            SolarDiterima      = dbitem.SolarDiterima;
            KapalDiterima      = dbitem.KapalDiterima;
            KeteranganDiterima = dbitem.KeteranganDiterima;
            KasDiakui          = dbitem.KasDiakui;
            TransferDiakui     = dbitem.TransferDiakui;
            SolarDiakui        = dbitem.SolarDiakui;
            KapalDiakui        = dbitem.KapalDiakui;
            KeteranganDiakui   = dbitem.KeteranganDiakui;
            KasKembali         = dbitem.KasKembali;
            TransferKembali    = dbitem.TransferKembali;
            SolarKembali       = dbitem.SolarKembali;
            KapalKembali       = dbitem.KapalKembali;
            KeteranganKembali  = dbitem.KeteranganKembali;
            KasAktual          = dbitem.KasAktual;
            TransferAktual     = dbitem.TransferAktual;
            SolarAktual        = dbitem.SolarAktual;
            KapalAktual        = dbitem.KapalAktual;
            KeteranganAktual   = dbitem.KeteranganAktual;
            KasSelisih         = dbitem.KasSelisih;
            TransferSelisih    = dbitem.TransferSelisih;
            SolarSelisih       = dbitem.SolarSelisih;
            KapalSelisih       = dbitem.KapalSelisih;
            KeteranganSelisih  = dbitem.KeteranganSelisih;
            Keterangan         = dbitem.Keterangan;
        }
Ejemplo n.º 5
0
        public Dokumen(Context.Dokumen dbitem)
        {
            Id           = dbitem.Id;
            IdSalesOrder = dbitem.IdSO;
            if (dbitem.SalesOrder.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderKontrakId.HasValue)
            {
                List <int> ListIdDumy = dbitem.ListIdSo.Split(new string[] { "." }, StringSplitOptions.None).ToList().Select(int.Parse).ToList();
                List <Context.SalesOrderKontrakListSo> dbsoDummy = dbitem.SalesOrder.SalesOrderKontrak.SalesOrderKontrakListSo.Where(d => ListIdDumy.Contains(d.Id)).ToList();
                dbitem.SalesOrder.SalesOrderKontrak.SalesOrderKontrakListSo = dbsoDummy;

                ModelKontrak = new SalesOrderKontrak(dbitem.SalesOrder);

                ModelKontrak.ListValueModelSOKontrak = ModelKontrak.ListModelSOKontrak;
            }
            ListDokumen = new List <DokumenItem>();
            foreach (var item in dbitem.DokumenItem)
            {
                ListDokumen.Add(new DokumenItem(item));
            }
            ListHistory = new List <DokumenItem>();
            foreach (var item in dbitem.DokumenItemHistory)
            {
                ListHistory.Add(new DokumenItem(item));
            }

            ListIdSo     = dbitem.ListIdSo;
            IsComplete   = dbitem.IsComplete;
            ModifiedDate = dbitem.ModifiedDate;
            IsAdmin      = dbitem.IsAdmin;
        }
Ejemplo n.º 6
0
        public RevisiJenisTruk(Context.SalesOrder dbitem)
        {
            IdSalesOrder = dbitem.Id;

            if (dbitem.SalesOrderOncallId.HasValue)
            {
                ModelOncall      = new SalesOrderOncall(dbitem);
                JenisTruckIdLama = ModelOncall.JenisTruckId;
            }
            else if (dbitem.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem);
                JenisTruckIdLama = ModelKonsolidasi.IdJnsTruck;
            }
            else if (dbitem.SalesOrderPickupId.HasValue)
            {
                ModelPickup      = new SalesOrderPickup(dbitem);
                JenisTruckIdLama = ModelPickup.JenisTruckId;
            }
        }
Ejemplo n.º 7
0
 public Removal(Context.SalesOrder dbitem)
 {
     if (dbitem.SalesOrderOncallId.HasValue)
     {
         ModelOncall = new SalesOrderOncall(dbitem);
         IdSo        = dbitem.SalesOrderOncallId;
         StrRuteLama = ModelOncall.Rute;
         ListUnload  = ModelOncall.ListUnload;
     }
     else if (dbitem.SalesOrderPickupId.HasValue)
     {
         ModelPickup = new SalesOrderPickup(dbitem);
         IdSo        = dbitem.SalesOrderPickupId;
         StrRuteLama = ModelPickup.Rute;
         ListUnload  = ModelPickup.ListUnload;
     }
     else if (dbitem.SalesOrderProsesKonsolidasiId.HasValue)
     {
         ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem);
         IdSo             = dbitem.SalesOrderProsesKonsolidasiId;
         StrRuteLama      = ModelKonsolidasi.Rute;
     }
 }
Ejemplo n.º 8
0
        public RevisiJenisTruk(Context.RevisiJenisTruk dbitem)
        {
            Id           = dbitem.Id;
            IdSalesOrder = dbitem.IdSalesOrder;

            if (dbitem.SalesOrder.SalesOrderOncallId.HasValue)
            {
                ModelOncall      = new SalesOrderOncall(dbitem.SalesOrder);
                JenisTruckIdLama = ModelOncall.JenisTruckId;
            }
            else if (dbitem.SalesOrder.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem.SalesOrder);
                JenisTruckIdLama = ModelKonsolidasi.IdJnsTruck;
            }
            else if (dbitem.SalesOrder.SalesOrderPickupId.HasValue)
            {
                ModelPickup      = new SalesOrderPickup(dbitem.SalesOrder);
                JenisTruckIdLama = ModelPickup.JenisTruckId;
            }
            JenisTruckIdBaru = dbitem.JenisTruckIdBaru;
            KeteranganRevisi = KeteranganRevisi;
        }
Ejemplo n.º 9
0
        public RevisiTanggal(Context.SalesOrder dbitem)
        {
            IdSalesOrder = dbitem.Id;

            if (dbitem.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem);
                TanggalLama = ModelOncall.TanggalMuat;
                JamLama     = ModelOncall.JamMuat;
            }
            else if (dbitem.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem);
                TanggalLama = ModelPickup.TanggalPickup;
                JamLama     = ModelPickup.JamPickup;
            }
            else if (dbitem.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem);
                TanggalLama      = ModelKonsolidasi.TanggalMuat;
                JamLama          = ModelKonsolidasi.JamMuat;
            }
        }
Ejemplo n.º 10
0
        public RemovalAUJ(Context.Removal dbitem, List <Context.Atm> listAtm, List <Context.DataBorongan> listBorongan)
        {
            Id = dbitem.Id;
            IdAdminUangJalan      = dbitem.IdAdminUangJalan;
            IdSO                  = dbitem.IdSO;
            ModelListTambahanRute = new List <AdminUangJalanTambahanRute>();
            foreach (var item in dbitem.RemovalTambahanRute)
            {
                ModelListTambahanRute.Add(new AdminUangJalanTambahanRute(item));
            }
            ModelListTambahanLain = new List <AdminUangJalanTambahanLain>();
            foreach (var item in dbitem.RemovalTambahanLain)
            {
                ModelListTambahanLain.Add(new AdminUangJalanTambahanLain(item));
            }
            ModelListPotonganLain = new List <AdminUangJalanPotonganLain>();
            foreach (var item in dbitem.RemovalPotonganDriver)
            {
                ModelListPotonganLain.Add(new AdminUangJalanPotonganLain(item));
            }
            ModelListBorongan = new List <AdminUangBorongan>();
            if (dbitem.IdDataBorongan != null)
            {
                foreach (var item in dbitem.IdDataBorongan.Split(','))
                {
                    ModelListBorongan.Add(new AdminUangBorongan()
                    {
                        IdDataBorongan = int.Parse(item), NamaDataBorongan = listBorongan.Where(d => d.Id == int.Parse(item)).FirstOrDefault().NamaBorongan
                    });
                }
            }
            if (ModelListBorongan.Count == 0)
            {
                ModelListBorongan.Add(new AdminUangBorongan());
            }
            NilaiBorongan       = dbitem.NilaiBorongan;
            Kawalan             = dbitem.Kawalan;
            Timbangan           = dbitem.Timbangan;
            Karantina           = dbitem.Karantina;
            SPSI                = dbitem.SPSI;
            Multidrop           = dbitem.Multidrop;
            TotalBorongan       = dbitem.TotalBorongan;
            KeteranganAdmin     = dbitem.KeteranganAdmin;
            KeteranganRemoval   = dbitem.KeteranganRemoval;
            IdDriver1           = dbitem.IdDriver1;
            NamaDriver1         = dbitem.IdDriver1.HasValue ? dbitem.Driver1.KodeDriver + " - " + dbitem.Driver1.NamaDriver : "";
            IdDriver2           = dbitem.IdDriver2;
            NamaDriver2         = dbitem.IdDriver2.HasValue ? dbitem.Driver2.KodeDriver + " - " + dbitem.Driver2.NamaDriver : "";
            TotalKasbon         = dbitem.TotalKasbon;
            KasbonDriver1       = dbitem.KasbonDriver1;
            KasbonDriver2       = dbitem.KasbonDriver2;
            TotalKlaim          = dbitem.TotalKlaim;
            KlaimDriver1        = dbitem.KlaimDriver1;
            KlaimDriver2        = dbitem.KlaimDriver2;
            TotalPotonganDriver = dbitem.TotalPotonganDriver;
            Status              = dbitem.Status;
            ModelListSpbu       = new List <AdminUangJalanVoucherSpbu>();
            foreach (var item in dbitem.RemovalVoucherSpbu)
            {
                ModelListSpbu.Add(new AdminUangJalanVoucherSpbu(item));
            }
            ModelListKapal = new List <AdminUangJalanVoucherKapal>();
            foreach (var item in dbitem.RemovalVoucherKapal)
            {
                ModelListKapal.Add(new AdminUangJalanVoucherKapal(item));
            }
            ModelListTf = new List <AdminUangJalanUangTf>();
            foreach (var item in dbitem.RemovalUangTf)
            {
                ModelListTf.Add(new AdminUangJalanUangTf(item, listAtm));
            }
            TotalAlokasi = dbitem.TotalAlokasi;

            if (listAtm.Any(d => d.IdDriver == IdDriver1))
            {
                DummyAtm = new Atm(listAtm.Where(d => d.IdDriver == IdDriver1).FirstOrDefault());
            }

            if (dbitem.SalesOrder.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem.SalesOrder);
            }
        }
Ejemplo n.º 11
0
        public SettlementReg(Context.SettlementReguler dbitem, List <Context.Atm> listAtm)
        {
            Id           = dbitem.Id;
            IdSalesOrder = dbitem.IdSalesOrder;
            Code         = dbitem.Code;
            if (dbitem.SalesOrder.SalesOrderOncallId.HasValue)
            {
                ModelOncall = new SalesOrderOncall(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderPickupId.HasValue)
            {
                ModelPickup = new SalesOrderPickup(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderProsesKonsolidasiId.HasValue)
            {
                ModelKonsolidasi = new SalesOrderProsesKonsolidasi(dbitem.SalesOrder);
            }
            else if (dbitem.SalesOrder.SalesOrderKontrakId.HasValue)
            {
                ModelKontrak = new SalesOrderKontrak(dbitem.SalesOrder);
            }
            KasDiterima        = dbitem.KasDiterima;
            TransferDiterima   = dbitem.TransferDiterima;
            SolarDiterima      = dbitem.SolarDiterima;
            KapalDiterima      = dbitem.KapalDiterima;
            KeteranganDiterima = dbitem.KeteranganDiterima;
            KasDiakui          = dbitem.KasDiakui;
            TransferDiakui     = dbitem.TransferDiakui;
            SolarDiakui        = dbitem.SolarDiakui;
            KapalDiakui        = dbitem.KapalDiakui;
            KeteranganDiakui   = dbitem.KeteranganDiakui;
            KasKembali         = dbitem.KasKembali;
            TransferKembali    = dbitem.TransferKembali;
            SolarKembali       = dbitem.SolarKembali;
            KapalKembali       = dbitem.KapalKembali;
            KeteranganKembali  = dbitem.KeteranganKembali;
            KasAktual          = dbitem.KasAktual;
            TransferAktual     = dbitem.TransferAktual;
            SolarAktual        = dbitem.SolarAktual;
            KapalAktual        = dbitem.KapalAktual;
            KeteranganAktual   = dbitem.KeteranganAktual;
            KasSelisih         = dbitem.KasSelisih;
            TransferSelisih    = dbitem.TransferSelisih;
            SolarSelisih       = dbitem.SolarSelisih;
            KapalSelisih       = dbitem.KapalSelisih;
            KeteranganSelisih  = dbitem.KeteranganSelisih;

            ListBiayaTambahan = new List <SettlementRegTambahanBiaya>();
            foreach (var item in dbitem.SettlementRegulerTambahanBiaya)
            {
                ListBiayaTambahan.Add(new SettlementRegTambahanBiaya(item));
            }

            TotalCash      = dbitem.TotalCash;
            TanggalCash    = dbitem.TanggalCash;
            IdDriverTujuan = dbitem.IdDriverTujuan;
            if (dbitem.IdDriverTujuan.HasValue)
            {
                NamaDriverTujuan = dbitem.DriverTujuan.KodeDriver + " - " + dbitem.DriverTujuan.NamaDriver;
            }
            IdDriverTitip = dbitem.IdDriverTitip;
            if (dbitem.IdDriverTitip.HasValue)
            {
                NamaDriverTitip = dbitem.DriverTitip.KodeDriver + " - " + dbitem.DriverTitip.NamaDriver;
            }
            TotalTf   = dbitem.TotalTf;
            TanggalTf = dbitem.TanggalTf;
            if (dbitem.IdAtm.HasValue)
            {
                IdAtm       = dbitem.IdAtm;
                NoRekening  = dbitem.Atm.NoRekening;
                AtasNamaRek = dbitem.Atm.AtasNama;
                Bank        = dbitem.Atm.LookupCodeBank.Nama;
            }
            else
            {
                //Context.Atm dbattm = listAtm.Where(d => d.IdDriver == dbitem.SalesOrder.AdminUangJalan.IdDriver1).FirstOrDefault();
                //if (dbattm != null)
                //{
                //    IdAtm = dbattm.Id;
                //    NoRekening = dbattm.NoRekening;
                //    AtasNamaRek = dbattm.AtasNama;
                //    Bank = dbattm.LookupCodeBank.Nama;
                //}
            }

            KeteranganPembayaran = dbitem.KeteranganPembayaran;
            listIdSoKontrak      = dbitem.LisSoKontrak;
            TotalBayar           = dbitem.TotalBayar;
        }