public static string[] Get_CarInfo(string id)
        {
            String[]  infos = new String[13];
            var       Cid   = Convert.ToInt32(id);
            DataTable data  = VehicleModel.Info(Cid);
            DataTable Modal = ModelClass.GeModelName(data.Rows[0]["ModelID"].ToString(), data.Rows[0]["ModelYear"].ToString(),
                                                     data.Rows[0]["ManufacthreID"].ToString());

            if (data.Rows.Count > 0)
            {
                infos[0]  = data.Rows[0]["License_Number"].ToString();
                infos[1]  = ManufacthreModel.GetozarName(data.Rows[0]["ManufacthreID"].ToString());
                infos[2]  = Modal.Rows[0]["degem_nm"].ToString();
                infos[3]  = data.Rows[0]["misgeret"].ToString();
                infos[4]  = data.Rows[0]["ModelYear"].ToString();
                infos[5]  = data.Rows[0]["tokef_test"].ToString();
                infos[6]  = data.Rows[0]["Gimor"].ToString();
                infos[7]  = data.Rows[0]["Balot"].ToString();
                infos[8]  = data.Rows[0]["imageUrl"].ToString();
                infos[9]  = Modal.Rows[0]["kinuy_mishari"].ToString();
                infos[10] = Modal.Rows[0]["merkav"].ToString();
                infos[11] = Modal.Rows[0]["nefah_manoa"].ToString();
                infos[12] = Modal.Rows[0]["delek_nm"].ToString();


                return(infos);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public static List <string> ClintInfo(string id)
        {
            if (id.Length == 9 & CustomerEx(id))
            {
                List <string> AllData = new List <string>();
                var           gargeid = HttpContext.Current.Session["UserID"].ToString();
                DataTable     sql     = new sql_class().Where("GaragID", gargeid).Where("UsarName", id).Get("Customer");
                var           CustmID = sql.Rows[0]["CustomerID"].ToString();
                DataTable     data    = new sql_class().Where("CustomerID", CustmID).Get("Vehicle");

                //get the car datels after geting the data from vehicle table
                var       Modelcar      = data.Rows[0]["ModelID"].ToString();
                var       ModelYear     = data.Rows[0]["ModelYear"].ToString();
                var       ManufacthreID = data.Rows[0]["ManufacthreID"].ToString();
                DataTable cardata       = ModelClass.GeModelName(Modelcar, ModelYear, ManufacthreID);

                //get model maufathrename
                var    tozar       = cardata.Rows[0]["tozeret_cd"].ToString();
                string cardataName = ManufacthreModel.GetozarName(tozar);


                var NumberRow = sql.Columns.Count + data.Columns.Count + cardata.Columns.Count;
                for (int i = 0; i < NumberRow; i++)
                {
                    if (sql.Columns.Count > i)
                    {
                        AllData.Add(sql.Rows[0][i].ToString());
                    }
                    if (data.Columns.Count > i)
                    {
                        AllData.Add(data.Rows[0][i].ToString());
                    }
                    if (cardata.Columns.Count > i)
                    {
                        AllData.Add(cardata.Rows[0][i].ToString());
                    }
                }
                AllData.Add(cardataName);

                return(AllData);
            }
            else
            {
                return(null);
            }
        }