public void LoadItem(string name)
 {
     _groupName = name;
     DataAccess da = new DataAccess();
     spare_group b = da.GetSpareGroup(name);
     edtName.Text = b.name;
     edtDescr.Text = b.description;
 }
 private void OfferingAdd(int SpareID)
 {
     SpareInSpareIncomeView sisi = new SpareInSpareIncomeView();
     if (Income.currency == null)
         Income.currencyReference.Load();
     sisi.num = offerings.Count + 1;
     sisi.CurrencyID = Income.currency.id;
     sisi.description = "";
     sisi.Markup = 0;
     sisi.PIn = 1;
     sisi.PInBasic = 1;
     sisi.POut = 1;
     sisi.POutBasic = 1;
     sisi.QIn = 1;
     sisi.QRest = 1;
     sisi.S = 1;
     sisi.SBasic = 1;
     DataAccess db = new DataAccess();
     sisi.SpareID = SpareID;
     SpareView sv = db.GetSpareView(SpareID);
     sisi.SpareName = sv.name;
     sisi.SpareCode = sv.code;
     sisi.SpareCodeShatem = sv.codeShatem;
     sisi.BrandName = sv.BrandName;
     sisi.SpareIncomeID = Income.id;
     sisi.VatRateName = "0%";
     sisi.GroupName = db.GetSpareGroup(sv.GroupID).name;
     sisi.ParentGroupName = db.GetSpareGroup(sv.spare_group1_id.Value).name;
     offerings.Add(sisi);
 }