Esempio n. 1
0
        public void Add_Resource_To_Part()
        {
            IPartsService repo = new PartsService(new BadgerDataModel());
            PartDetailDTO part = new PartDetailDTO();

            part.UnitCost        = 1.25m;
            part.ItemDescription = "Master Widjet 1023";
            part.ItemName        = "MW-1023";
            part.PartNum         = "MW-10034";

            part.MarkUp   = 1.25m;
            part.Waste    = 2.0m;
            part.Weight   = 12.25m;
            part.UID      = 1;
            part.ManuId   = 245;
            part.Location = "AC23";
            part.Obsolete = false;
            part.Sku      = "1023847A990";

            ResourceDto resource = new ResourceDto
            {
                ResourceDescription = "Chipman Home Network",
                CurrentVersion      = 1,
                Data = File.ReadAllBytes(@"C:\Users\Rich.DESIGNSYNTHESIS\Documents\chipmanHomeNetwork.sdr")
            };

            part.Resources.Add(resource);
            repo.InsertOrUpdate(part, "Richard Young");

            Assert.IsTrue(1 == 1);
        }
Esempio n. 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     partService.InsertOrUpdate(_partDTO, "Richard Young");
     loadData(_partDTO.PartID);
     isDirty = false;
     ToogleButtonStyle(isDirty);
 }