/// <summary>
        /// Date Created:   07/Nov/2013
        /// Created By:     Josephine  gad
        /// (description)   Add Plate No. in ListView
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void uoButtonVehicleTypePlateAdd_Click(object sender, EventArgs e)
        {
            List <VehiclePlate> list = new List <VehiclePlate>();

            list = GetVehicleVendorPlateNo(0);

            char[]   delimiterChars = { '-' };
            string[] words          = uoDropDownListVehicleMaker.SelectedItem.Value.Split(delimiterChars);

            VehiclePlate item = new VehiclePlate();

            item.VehicleTypeID   = GlobalCode.Field2Int(uoDropDownListVendorTypePlate.SelectedValue);
            item.VehicleTypeName = uoDropDownListVendorTypePlate.SelectedItem.Text;

            item.VehiclePlateName = uoTextBoxPlateNo.Text.Trim();

            if (words.Length > 1)
            {
                item.VehicleMakeID   = GlobalCode.Field2Int(words[1]);
                item.VehicleMakeName = uoDropDownListVehicleMaker.SelectedItem.Text;
            }

            item.VehicleBrandID   = GlobalCode.Field2Int(uoDropDownListVehicleBrand.SelectedValue);
            item.VehicleBrandName = uoDropDownListVehicleBrand.SelectedItem.Text;


            item.VehicleColor     = uoHiddenFieldColorCode.Value;
            item.VehicleColorName = uoHiddenFieldColorName.Value;

            list.Add(item);
            list = list.OrderBy(a => a.VehicleTypeName).ThenBy(a => a.VehiclePlateName).ToList();

            Session["VendorVehiclePlate"] = list;
            BindVehiclePlateNo(0);
            uoTextBoxPlateNo.Text = "";
        }
Пример #2
0
 public bool Save(VehiclePlate VehiclePlate)
 {
     _VehiclePlateApp.InsertOrUpdate(VehiclePlate);
     return(_connection.Save());
 }
Пример #3
0
 public bool InsertOrUpdate(VehiclePlate Vehicle)
 {
     return(_epr.InsertOrUpdate(Vehicle));
 }