Exemplo n.º 1
0
        private void LoadDefaultValue()
        {
            SparePartsInfoBL viBL = new SparePartsInfoBL();

            foreach (var SparePartstypes in viBL.GetSparePartsTypes())
            {
                ComboboxItem obj = new ComboboxItem();
                obj.Text  = SparePartstypes.Description;
                obj.Value = SparePartstypes.SparePartsTypeID;
                ddlSparePartsType.Items.Add(obj);
            }
        }
Exemplo n.º 2
0
        private void PopulateSparePartstype(int SparePartsInfoID)
        {
            SparePartsInfoBL obj        = new SparePartsInfoBL();
            var          SparePartsInfo = obj.GetSparePartsInfo(SparePartsInfoID);
            var          SparePartsType = obj.GetSparePartsTypes().Where(vt => vt.SparePartsTypeID == SparePartsInfo.SparePartsTypeID).FirstOrDefault();
            ComboboxItem selitem        = new ComboboxItem();

            selitem.Text           = SparePartsType.Description;
            selitem.Value          = SparePartsType.SparePartsTypeID;
            ddlSparePartsType.Text = selitem.Text;
            txtModelCode.Text      = SparePartsInfo.ModelCode;
            txtModelName.Text      = SparePartsInfo.ModelName;
            txtShowRoomPrice.Text  = SparePartsInfo.ShowRoomPrice.ToString();
            txtMarginPrice.Text    = SparePartsInfo.MarginPrice.ToString();
        }