Exemplo n.º 1
0
        public PCVItem(Exchangepartdetail ed, ServiceItemState state)
            : this()
        {
            this.Id = ed.Id;
            this.Broken = ed.Broken;
            this.Exchangepartheader = ed.Exchangepartheader;
            this.Partcodem = ed.Partcodem;
            this.Partcodeo = ed.Partcodeo;
            this.Partqtym = ed.Partqtym;
            this.Partqtyo = ed.Partqtyo;
            this.Serialnumber = ed.Serialnumber;
            this.Totalfeem = ed.Totalfeem;
            this.Totalfeeo = ed.Totalfeeo;
            this.Unitpricem = ed.Unitpricem;
            this.Unitpriceo = ed.Unitpriceo;
            this.Vmepcomment = ed.Vmepcomment;

            Warrantycondition warr = WarrantyContent.GetWarrantyCondition(ed.Partcodeo);
            //if (warr == null) throw new Exception(string.Format("Part Code not found: {0}", ed.Partcodeo));
            if (warr != null)
            {
                this.PartName = (UserHelper.Language.Equals("vi-VN")) ? warr.Partnamevn : warr.Partnameen;
                this.Labour = warr.Labour;
                this.SManPower = warr.Manpower;
            }
            this.State = state;
        }
Exemplo n.º 2
0
 public static List<SRSItem> ConvertToSRSItem(List<Servicedetail> items, ServiceItemState state)
 {
     List<SRSItem> res = new List<SRSItem>();
     foreach (Servicedetail item in items)
     {
         res.Add(new SRSItem(item, state));
     }
     return res;
 }
Exemplo n.º 3
0
 public SRSItem(Servicedetail sd, ServiceItemState state)
     : this()
 {
     this.Id = sd.Id;
     this.Partcode = sd.Partcode;
     this.Partname = sd.Partname;
     this.Partqty = sd.Partqty;
     this.Serialnumber = sd.Serialnumber;
     this.Serviceheader = sd.Serviceheader;
     this.Unitprice = sd.Unitprice;
     this.State = state;
 }
Exemplo n.º 4
0
 public static List<PCVItem> ConvertToPCVItem(List<Exchangepartdetail> items, ServiceItemState state)
 {
     List<PCVItem> res = new List<PCVItem>();
     foreach (Exchangepartdetail item in items)
     {
         res.Add(new PCVItem(item, state));
     }
     return res;
 }