Ejemplo n.º 1
0
    public DataSet generateArrayIndex()
    {
        int[]     arr;
        int[]     fleetarr;
        int[]     carrierId   = new int[200];
        string    fleetString = string.Empty;
        DataTable carrierdt   = new DataTable();
        DataTable fleetdt     = new DataTable();
        DataSet   ds          = new DataSet();

        carrierdt.Columns.Add("carrierId");
        fleetdt.Columns.Add("carrierId");
        arr      = car_listbox.GetCheckedIndices();
        fleetarr = RadListBoxFleet.GetCheckedIndices();
        foreach (int index in fleetarr)
        {
            fleetdt.Rows.Add(RadListBoxFleet.Items[index].Value);
        }
        foreach (int index in arr)
        {
            carrierdt.Rows.Add(car_listbox.Items[index].Value);
        }
        cls_Carriers obj_carrier = new cls_Carriers();

        ds = obj_carrier.fn_fetchLastLocation(carrierdt, fleetdt);
        return(ds);
    }
Ejemplo n.º 2
0
    public DataSet getSelectedVehicles()
    {
        int[]     arr;
        int[]     fleetarr;
        int[]     carrierId   = new int[200];
        string    fleetString = string.Empty;
        DataTable carrierdt   = new DataTable();
        DataTable fleetdt     = new DataTable();

        DataSet ds = new DataSet();

        carrierdt.Columns.Add("carrierId");
        fleetdt.Columns.Add("carrierId");


        arr      = car_listbox.GetCheckedIndices();
        fleetarr = RadListBoxFleet.GetCheckedIndices();

        foreach (int index in fleetarr)
        {
            fleetdt.Rows.Add(RadListBoxFleet.Items[index].Value);
        }
        foreach (int index in arr)
        {
            carrierdt.Rows.Add(car_listbox.Items[index].Value);
        }
        ds.Tables.Add(carrierdt);
        ds.Tables.Add(fleetdt);
        return(ds);
    }
Ejemplo n.º 3
0
    public DataSet generateArrayIndex()
    {
        int[]  arr;
        int[]  fleetarr;
        int[]  carrierId   = new int[200];
        string fleetString = string.Empty;

        arraycount = 0;
        DataTable carrierdt = new DataTable();
        DataTable fleetdt   = new DataTable();

        DataSet ds = new DataSet();

        carrierdt.Columns.Add("carrierId");
        fleetdt.Columns.Add("carrierId");



        arr      = car_listbox.GetCheckedIndices();
        fleetarr = RadListBoxFleet.GetCheckedIndices();

        foreach (int index in fleetarr)
        {
            fleetdt.Rows.Add(RadListBoxFleet.Items[index].Value);
        }
        foreach (int index in arr)
        {
            carrierdt.Rows.Add(car_listbox.Items[index].Value);
        }

        //foreach(int index in fleetarr)
        //{
        //    fleetString=fleetString+RadListBoxFleet.Items[index].Value+",";
        //}
        //if (fleetString.Length > 0)
        //{
        //    fleetString = fleetString.Substring(0, fleetString.Length - 1);
        //}
        cls_Carriers obj_carrier = new cls_Carriers();

        ds = obj_carrier.fn_fetchLastLocation(carrierdt, fleetdt);



        //DataSet ds = new DataSet();
        //ds = obj_carrier.Prc_CarrierLastLoc_FetchByString(fleetString);

        //foreach (int index in arr)
        //{
        //    string carrier_id = car_listbox.Items[index].Value;
        //    carrierId[arraycount] = Int32.Parse(car_listbox.Items[index].Value);
        //    arraycount++;
        //}
        //for (int k = 0; k < ds.Tables[0].Rows.Count; k++)
        //{
        //    carrierId[arraycount] = (int)ds.Tables[0].Rows[k]["carrierFID"];
        //    arraycount++;
        //}
        //string str = generateString(carrierId);
        //Session["carrierString"] = str;
        //Session["carrierIdArray"] = carrierId;
        //return carrierId;
        return(ds);
    }