Exemple #1
0
 public CustPIC(Context.CustomerPic dbitem)
 {
     Id           = dbitem.Id;
     CustomerId   = dbitem.CustomerId;
     Code         = dbitem.Code;
     Nama         = dbitem.Name;
     DepartemenId = dbitem.DepartemenId;
     Dept         = dbitem.LookUpCodesDept.Nama;
     JabatanId    = dbitem.JabatanId;
     Jabatan      = dbitem.LookUpCodesJabatan.Nama;
     EmailAdd     = dbitem.EmailAdd;
     Mobile       = dbitem.Mobile;
 }
Exemple #2
0
        public DaftarHargaKontrak(Context.DaftarHargaKontrak dbitem)
        {
            Context.CustomerPic     custPIC  = dbitem.Customer.CustomerPic.FirstOrDefault();
            Context.CustomerAddress custAddr = dbitem.Customer.CustomerAddress.Where(
                a => a.LookUpCodesOffice.Nama.ToLower() == "head office" || a.LookUpCodesOffice.Nama.ToLower() == "kantor pusat").FirstOrDefault();

            listKondisi = new List <DaftarHargaKondisi>();
            DaftarHargaKondisi.GenerateKondisi(listKondisi);

            Id            = dbitem.Id;
            IdCust        = dbitem.IdCust;
            KodeCustomer  = dbitem.Customer.CustomerCode;
            KodeNama      = dbitem.Customer.CustomerCodeOld;
            NamaCustomer  = dbitem.Customer.CustomerNama;
            PeriodStart   = dbitem.PeriodStart;
            PeriodEnd     = dbitem.PeriodEnd;
            IdTypeKontrak = dbitem.IdTypeKontrak;

            if (custAddr != null)
            {
                AlamatCustomer = custAddr.Alamat;
                TelpCustomer   = custAddr.Telp;
                FaxCustomer    = custAddr.Fax;
            }

            if (custPIC != null)
            {
                ContactCustomer = custPIC.Name;
                HpCustomer      = custPIC.Mobile;
            }

            //item
            listItem = new List <DaftarHargaKontrakItem>();
            foreach (Context.DaftarHargaKontrakItem item in dbitem.DaftarHargaKontrakItem.ToList())
            {
                listItem.Add(new DaftarHargaKontrakItem(item));
            }
            //kondisi
            listKondisi = new List <DaftarHargaKondisi>();
            foreach (Context.DaftarHargaKontrakKondisi item in dbitem.DaftarHargaKontrakKondisi.ToList())
            {
                listKondisi.Add(new DaftarHargaKondisi(item));
            }
            //attachment
            listAtt = new List <DaftarHargaKontrakAttachment>();
            foreach (Context.DaftarHargaKontrakAttachment item in dbitem.DaftarHargaKontrakAttachment.ToList())
            {
                listAtt.Add(new DaftarHargaKontrakAttachment(item));
            }
        }
Exemple #3
0
 public CustNotif(Context.CustomerNotification dbitem, Context.CustomerPic dbpic)
 {
     Id         = dbitem.Id;
     CustomerId = dbitem.CustomerId;
     IsActive   = dbitem.IsActive;
     IdPic      = dbitem.IdPic;
     Nama       = dbpic.Name;
     Jabatan    = dbpic.LookUpCodesJabatan.Nama;
     Email      = dbpic.EmailAdd;
     Sms        = dbpic.Mobile;
     NotifType  = dbitem.NotifType;
     strIdRute  = string.Join(",", dbitem.CustomerNotifRute.Select(d => d.IdRute.Value));
     strRute    = string.Join(", ", dbitem.CustomerNotifRute.Select(d => d.Rute.Nama));
     strIdTruck = string.Join(",", dbitem.CustomerNotifTruck.Select(d => d.IdTruck.Value));
     strTruck   = string.Join(", ", dbitem.CustomerNotifTruck.Select(d => d.JenisTrucks.StrJenisTruck));
 }