Example #1
0
        private void Filllocationdrp()
        {
            string         strSql      = "select OCE_ID,replace(convert(char(40),ltrim(OCE_DESCRIPTION  ))+OCE_ID,' ',' ' )  as LOCATIONNAME from ENT_ORG_COMMON_ENTITIES where OCE_ISDELETED='0' AND CEM_ENTITY_ID='LOC'";
            SqlCommand     cmd         = new SqlCommand(strSql, conString);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);
            ListBox3.DataValueField = "oce_id";
            ListBox3.DataTextField  = "LOCATIONNAME";
            ListBox3.DataSource     = thisDataSet.Tables[0];
            ListBox3.DataBind();

            ListBox9.DataValueField = "oce_id";
            ListBox9.DataTextField  = "LOCATIONNAME";
            ListBox9.DataSource     = thisDataSet.Tables[0];
            ListBox9.DataBind();
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <string> cities = new List <string>();

            cities.Add("Gilgit");
            cities.Add("Chitral");
            cities.Add("Dasu");
            cities.Add("Dir");
            cities.Add("Malakand");
            cities.Add("Noshera");
            cities.Add("Mansehra");
            cities.Add("Hassan Abdal");
            cities.Add("Peshawar");
            cities.Add("Attock");
            cities.Add("Kohat");
            cities.Add("Islamabad");
            cities.Add("Murree");
            cities.Add("Rawat");
            cities.Add("Balkasar");
            cities.Add("Chakwal");
            cities.Add("Mianwali");
            cities.Add("Bhera");
            cities.Add("Sargoda");
            cities.Add("Pindi Bhattian");
            cities.Add("Jhang");
            cities.Add("Faisalabad");
            cities.Add("Lahore");
            cities.Add("Dina");
            cities.Add("Gujranwala");
            cities.Add("Multan");
            cities.Add("DG Khan");
            cities.Add("Bahwalpur");
            cities.Add("Sukkur");
            cities.Add("Rajanpur");
            cities.Add("Loralai");
            cities.Add("Jacobabad");
            cities.Add("Quetta");
            cities.Add("Khuzdar");
            cities.Add("Karachi");
            cities.Add("Lasbela");
            cities.Add("Gwadar");
            cities.Add("Awaran");
            cities.Add("Turbat");



            if (!IsPostBack)
            {
                CheckBoxList1.DataSource = cities;
                CheckBoxList2.DataSource = cities;
                CheckBoxList3.DataSource = cities;
                CheckBoxList1.DataBind();
                CheckBoxList2.DataBind();
                CheckBoxList3.DataBind();
            }
            GridView1.DataSource = ExcelToDS().Tables[0];
            GridView1.DataBind();

            loadData();
            int[,] prep2 = new int[39, 39];
            int[,] D1    = resetMatrix(mygraph.vedges);
            for (int i = 0; i < 39; i++)
            {
                for (int j = 0; j < 39; j++)
                {
                    prep2[i, j] = D1[i, j];
                }
            }
            //   int[,] prevD = resetMatrix2(mygraph.vedges);
            int [,] Dp = Floyd(D1, 39);

            //========================================================================//

            Prims            obj     = new Prims();
            List <totaledgs> newlist = obj.primMST(mygraph.vedges);

            ListBox7.DataSource    = newlist;
            ListBox8.DataSource    = newlist;
            ListBox9.DataSource    = newlist;
            Label2.Text            = newlist[1].Weight.ToString();
            ListBox7.DataTextField = "src";
            ListBox7.DataBind();
            ListBox8.DataTextField = "dst";
            ListBox8.DataBind();
            ListBox9.DataTextField = "weight";
            ListBox9.DataBind();
        }
Example #3
0
        private void fillEntities()
        {
            string mgrId = Session["uid"].ToString();

            string levelId = Session["levelId"].ToString();

            //SqlConnection con = new SqlCOConnection(m_connectons);

            if (conString.State == ConnectionState.Closed)
            {
                conString.Open();
            }

            SqlCommand cmd = new SqlCommand("spFillEntities2", conString);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@levelid", levelId);

            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);
            if (conString.State == ConnectionState.Open)
            {
                conString.Close();
            }
            ListBox1.DataValueField = "EOD_EMPID";
            ListBox1.DataTextField  = "EmployeeName";
            ListBox1.DataSource     = thisDataSet.Tables[0];
            ListBox1.DataBind();


            ListBox7.DataValueField = "EOD_EMPID";
            ListBox7.DataTextField  = "EmployeeName";
            ListBox7.DataSource     = thisDataSet.Tables[0];
            ListBox7.DataBind();



            DataTable dtDivision = thisDataSet.Tables[3].DefaultView.ToTable(true, "DivisionID", "Division_NAME");

            ListBox4.DataValueField = "DivisionID";
            ListBox4.DataTextField  = "Division_NAME";

            ListBox4.DataSource = dtDivision;

            ListBox4.DataBind();

            ListBox10.DataValueField = "DivisionID";
            ListBox10.DataTextField  = "Division_NAME";
            ListBox10.DataSource     = thisDataSet.Tables[3];
            ListBox10.DataBind();



            DataTable dtLocation = thisDataSet.Tables[1].DefaultView.ToTable(true, "LocationID", "Location_NAME");

            ListBox3.DataValueField = "LocationID";
            ListBox3.DataTextField  = "Location_NAME";

            ListBox3.DataSource = dtLocation;

            ListBox3.DataBind();

            ListBox9.DataValueField = "LocationID";
            ListBox9.DataTextField  = "Location_NAME";
            ListBox9.DataSource     = thisDataSet.Tables[1];
            ListBox9.DataBind();
        }