Beispiel #1
0
        private void FillVehicles()
        {
            int districtID = -1;

            if (Session["UserdistrictId"] != null)
            {
                districtID = Convert.ToInt32(Session["UserdistrictId"].ToString());
            }
            fmsg.UserDistrictId = districtID;
            DataSet ds = fmsg.GetVehicleNumberPetroCardEdit();


            //ds = objFuelEntry.IFillVehicles(districtID);
            ddlVehicles.DataSource     = ds.Tables[0];
            ddlVehicles.DataValueField = "VehicleID";
            ddlVehicles.DataTextField  = "VehicleNumber";
            ddlVehicles.DataBind();
            ddlVehicles.Items.Insert(0, "--Select--");
            //ddlVehicles.Items[0].Value = "0";
            ddlVehicles.SelectedIndex = 0;
            ddlVehicles.Enabled       = false;
        }
Beispiel #2
0
 private void FillVehicles()
 {
     try
     {
         var districtId = -1;
         if (Session["UserdistrictId"] != null)
         {
             districtId = Convert.ToInt32(Session["UserdistrictId"].ToString());
         }
         _fmsg.UserDistrictId = districtId;
         var ds = _fmsg.GetVehicleNumberPetroCardEdit();
         if (ds == null)
         {
             throw new ArgumentNullException(nameof(ds));
         }
         _helper.FillDropDownHelperMethodWithDataSet(ds, "VehicleNumber", "VehicleID", null, ddlVehicles);
         ddlVehicles.Enabled = false;
     }
     catch (Exception ex)
     {
         _helper.ErrorsEntry(ex);
     }
 }