Ejemplo n.º 1
0
    private void BindDropDownList5(string NAME)
    {
        DataTable dt = new DataTable();

        dt.Columns.Add("NAME", typeof(String));


        string connectionString = ConfigurationManager.ConnectionStrings["ERPconnectionstring"].ToString();

        Ede.Uof.Utility.Data.DatabaseHelper m_db = new Ede.Uof.Utility.Data.DatabaseHelper(connectionString);

        //string cmdTxt = @"SELECT  [ID],[NAME] FROM [TKBUSINESS].[dbo].[TBSALESNAME]  ORDER BY [ID]";
        string cmdTxt = @"SELECT  [ID],[NAME] FROM [TKBUSINESS].[dbo].[TBSALESNAME]  ORDER BY [ID]";

        m_db.AddParameter("@NAME", NAME);

        dt.Load(m_db.ExecuteReader(cmdTxt));

        if (dt.Rows.Count > 0)
        {
            DropDownList5.DataSource     = dt;
            DropDownList5.DataTextField  = "NAME";
            DropDownList5.DataValueField = "NAME";
            DropDownList5.DataBind();
        }
        else
        {
        }
    }
Ejemplo n.º 2
0
    private void getsubcategory()
    {
        if (Session["company_id"] != null)
        {
            company_id = Convert.ToInt32(Session["company_id"].ToString());
        }

        SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connection"]);
        SqlCommand    cmd = new SqlCommand("Select * from subcategory where category_id='" + DropDownList3.SelectedItem.Value + "' and Com_Id='" + company_id + "'", con);

        con.Open();
        DataSet        ds = new DataSet();
        SqlDataAdapter da = new SqlDataAdapter(cmd);

        da.Fill(ds);


        DropDownList5.DataSource     = ds;
        DropDownList5.DataTextField  = "subcategoryname";
        DropDownList5.DataValueField = "subcategory_id";
        DropDownList5.DataBind();
        DropDownList5.Items.Insert(0, new ListItem("All", "0"));



        con.Close();
    }
Ejemplo n.º 3
0
 protected void insertcountry_Click(object sender, EventArgs e)
 {
     if (TextBox2.Text != "")
     {
         int t = controllerObj.insertcountry(TextBox2.Text);
         if (t == 0)
         {
             Label2.Text = "this country is already exist .";
         }
         else
         {
             Label2.Text = "this country inserts corectly .";
         }
         DropDownList7.DataBind();
         DropDownList6.DataBind();
         DropDownList5.DataBind();
         DropDownList4.DataBind();
         DropDownList3.DataBind();
         DropDownList2.DataBind();
         DropDownList11.DataBind();
         DropDownList12.DataBind();
         DropDownList13.DataBind();
     }
     else
     {
         Label2.Text = "You enter missing data !!.";
     }
 }
Ejemplo n.º 4
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string         str  = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["constring"].ToString();
        SqlConnection  conn = new SqlConnection(str);
        SqlDataAdapter sda  = new SqlDataAdapter(" select sensor.sensorName,sensor.stationId from sensor,station where sensor.stationId= station.id and station.stationName = '" + DropDownList1.SelectedItem + "' ", conn);
        DataSet        ds   = new DataSet();

        sda.Fill(ds);
        DropDownList3.DataTextField = "sensorName";
        //  DropDownList2.DataValueField = "stationId";
        DropDownList3.DataSource = ds.Tables[0].DefaultView;
        DropDownList3.DataBind();
        DropDownList4.DataTextField = "sensorName";
        //  DropDownList2.DataValueField = "stationId";
        DropDownList4.DataSource = ds.Tables[0].DefaultView;
        DropDownList4.DataBind();
        DropDownList5.DataTextField = "sensorName";
        //  DropDownList2.DataValueField = "stationId";
        DropDownList5.DataSource = ds.Tables[0].DefaultView;
        DropDownList5.DataBind();
        DropDownList6.DataTextField = "sensorName";
        //  DropDownList2.DataValueField = "stationId";
        DropDownList6.DataSource = ds.Tables[0].DefaultView;
        DropDownList6.DataBind();
        DropDownList7.DataTextField = "sensorName";
        //  DropDownList2.DataValueField = "stationId";
        DropDownList7.DataSource = ds.Tables[0].DefaultView;
        DropDownList7.DataBind();
    }
Ejemplo n.º 5
0
    void kat()
    {
        DataSet Ds = new DataSet();

        try
        {
            string         com  = "select ast_kategori_code,UPPER(ast_kategori_desc) as ast_kategori_desc from Ref_ast_kategori";
            SqlDataAdapter adpt = new SqlDataAdapter(com, con);
            DataTable      dt   = new DataTable();
            adpt.Fill(dt);
            DropDownList5.DataSource     = dt;
            DropDownList5.DataTextField  = "ast_kategori_desc";
            DropDownList5.DataValueField = "ast_kategori_code";
            DropDownList5.DataBind();
            DropDownList5.Items.Insert(0, new ListItem("--- PILIH ---", ""));
            //DropDownList1.DataSource = dt;
            //DropDownList1.DataTextField = "ast_kategori_desc";
            //DropDownList1.DataValueField = "ast_kategori_code";
            //DropDownList1.DataBind();
            //DropDownList1.Items.Insert(0, new ListItem("--- PILIH ---", ""));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var le = from Tbl_Level in db.Tbl_Level select new { Tbl_Level.Name_Er, Tbl_Level.Level_ID, Tbl_Level.Name_Ar };
                DropDownList1.DataSource     = le.ToList();
                DropDownList1.DataValueField = "Level_ID";
                DropDownList1.DataTextField  = "Name_Er";
                DropDownList1.DataBind();
                DropDownList1.Items.Insert(0, new ListItem("--- select level----"));

                DropDownList5.DataSource     = le.ToList();
                DropDownList5.DataValueField = "Level_ID";
                DropDownList5.DataTextField  = "Name_Ar";
                DropDownList5.DataBind();
                DropDownList5.Items.Insert(0, new ListItem("--- اختر المستوي----"));

                var pr = from Tbl_Prof in db.Tbl_Prof where Tbl_Prof.Approval.Equals("1") select new { Tbl_Prof.Name, Tbl_Prof.Prof_ID };
                DropDownList3.DataSource     = pr.ToList();
                DropDownList3.DataValueField = "Prof_ID";
                DropDownList3.DataTextField  = "Name";
                DropDownList3.DataBind();
                DropDownList3.Items.Insert(0, new ListItem("--- select prof----"));

                DropDownList4.DataSource     = pr.ToList();
                DropDownList4.DataValueField = "Prof_ID";
                DropDownList4.DataTextField  = "Name";
                DropDownList4.DataBind();
                DropDownList4.Items.Insert(0, new ListItem("--- اختر الأستاذ----"));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SqlCommand cmd = new SqlCommand("Select distinct boarding_point from Trip", con);

                con.Open();

                DropDownList5.DataSource     = cmd.ExecuteReader();
                DropDownList5.DataTextField  = "boarding_point";
                DropDownList5.DataValueField = "boarding_point";
                DropDownList5.DataBind();

                con.Close();

                Session["board"] = DropDownList5.SelectedValue.ToString();
            }

            if (!IsPostBack)
            {
                SqlCommand cmd = new SqlCommand("Select distinct arrival_point from Trip", con);

                con.Open();

                DropDownList9.DataSource     = cmd.ExecuteReader();
                DropDownList9.DataTextField  = "arrival_point";
                DropDownList9.DataValueField = "arrival_point";
                DropDownList9.DataBind();

                Session["arrive"] = DropDownList9.SelectedValue.ToString();

                con.Close();
            }
        }
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!DropDownList3.SelectedValue.Equals("-1"))
            {
                DropDownList5.Enabled = true;
                DropDownList5.Items.Clear();
                DropDownList5.Items.Add(new ListItem("--Select Student--", "-1", true));
                DropDownList5.DataBind();
                DropDownList5.SelectedIndex = 0;
            }
            else
            {
                DropDownList5.Enabled = false;
            }

            if (!DropDownList3.SelectedValue.Equals("-1") && !DropDownList4.SelectedValue.Equals("-1") && !DropDownList5.SelectedValue.Equals("-1"))
            {
                Chart2.Visible = true;

                GridView2.Visible = true;
                View3_bind();
            }
            else
            {
                Chart2.Visible    = false;
                GridView2.Visible = false;
            }
        }
Ejemplo n.º 9
0
    private void BindDropDownList5()
    {
        DataSet        ds      = new DataSet();
        DatabaseHelper DbQuery = new DatabaseHelper();
        DataTable      dt      = new DataTable();
        DataRow        ndr     = dt.NewRow();

        dt.Columns.Add("MR002", typeof(String));
        dt.Columns.Add("MR003", typeof(String));

        string connectionString = ConfigurationManager.ConnectionStrings["ERPconnectionstring"].ToString();

        using (SqlConnection conn = new SqlConnection(connectionString))
        {
            SqlCommand command = new SqlCommand(@"SELECT LTRIM(RTRIM(MR002)) AS MR002,MR003 FROM [TK].dbo.CMSMR WHERE MR001='4' ORDER BY MR002", conn);

            ds.Clear();

            SqlDataAdapter adapter = new SqlDataAdapter(command);
            conn.Open();

            adapter.Fill(ds, command.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                DropDownList5.DataSource     = ds.Tables[0];
                DropDownList5.DataTextField  = "MR003";
                DropDownList5.DataValueField = "MR002";
                DropDownList5.DataBind();
            }
            else
            {
            }
        }
    }
Ejemplo n.º 10
0
        protected void Calendar1_SelectionChanged(object sender, EventArgs e)
        {
            Label9.Visible = false;
            Label8.Visible = false;
            List <DateTime> listaDatasDisp = new List <DateTime>();
            List <string>   listaHorasDisp = new List <string>();

            listaDatasDisp.Clear();
            listaHorasDisp.Clear();
            DropDownList5.Items.Clear();

            if (Calendar1.SelectedDate.Date <= DateTime.Today)
            {
                Label6.Visible = true;
            }
            else
            {
                Label6.Visible = false;
                ConsultaRules consultaRules = new ConsultaRules();


                listaDatasDisp = consultaRules.GetConsultasDisp(Calendar1.SelectedDate, Convert.ToInt32(DropDownList2.SelectedValue), Convert.ToInt32(DropDownList1.SelectedValue));

                foreach (DateTime data in listaDatasDisp)
                {
                    listaHorasDisp.Add(data.ToShortTimeString());
                }

                DropDownList5.DataSource = listaHorasDisp;
                DropDownList5.DataBind();
            }
        }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        cnn.Open();
        DropDownList3.Items.Clear();
        SqlCommand    cmd = new SqlCommand("select Subject from sub where Ptype='" + DropDownList1.SelectedItem.ToString() + "'", cnn);
        SqlDataReader dr  = cmd.ExecuteReader();

        dr.Read();
        DataTable dt = new DataTable("sub");

        dt.Load(dr);
        DropDownList3.DataSource    = dt;
        DropDownList3.DataTextField = "Subject";
        DropDownList3.DataBind();
        DropDownList4.DataSource    = dt;
        DropDownList4.DataTextField = "Subject";
        DropDownList4.DataBind();
        DropDownList5.DataSource    = dt;
        DropDownList5.DataTextField = "Subject";
        DropDownList5.DataBind();
        DropDownList6.DataSource    = dt;
        DropDownList6.DataTextField = "Subject";
        DropDownList6.DataBind();
        DropDownList7.DataSource    = dt;
        DropDownList7.DataTextField = "Subject";
        DropDownList7.DataBind();
        DropDownList8.DataSource    = dt;
        DropDownList8.DataTextField = "Subject";
        DropDownList8.DataBind();
        dr.Close();
    }
Ejemplo n.º 12
0
        private void dataProject(String project_id)
        {
            DataTable dt6 = TaskSystem.tools.GetData("SELECT [id], [version] FROM [project_version] WHERE [status]='released' AND [project_id]='" + project_id + "' ORDER BY [id]");

            DropDownList5.Items.Clear();
            DropDownList5.DataTextField  = "version";
            DropDownList5.DataValueField = "id";
            DropDownList5.DataSource     = dt6;
            if (dt6.Rows.Count > 0)
            {
                DropDownList5.DataBind();
            }
            DropDownList5.Items.Insert(0, new ListItem("", ""));

            DataTable dt7 = TaskSystem.tools.GetData("SELECT [id], [version] FROM [project_version] WHERE [status]='open' AND [project_id]='" + project_id + "' ORDER BY [id]");

            DropDownList6.Items.Clear();
            DropDownList6.DataTextField  = "version";
            DropDownList6.DataValueField = "id";
            if (dt6 != null)
            {
                if (dt6.Rows.Count > 0)
                {
                    DropDownList6.DataSource = dt7;
                    DropDownList6.DataBind();
                }
            }
            DropDownList6.Items.Insert(0, new ListItem("", ""));
        }
Ejemplo n.º 13
0
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            int Etos_Y_X = Convert.ToInt16(DropDownList3.SelectedValue);

            TextBox15.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y_X).ToString();

            DropDownList12.SelectedValue = "7";

            DropDownList5.Items.Clear();
            DropDownList5.Items.Add(new ListItem(" Επιλογή Μηνός ...", "0"));
            DropDownList5.DataBind();

            DropDownList14.Items.Clear();
            DropDownList14.Items.Add(new ListItem(" Επιλογή Εμβάσματος ...", "5"));
            DropDownList14.DataBind();


            DropDownList4.Items.Clear();
            DropDownList4.Items.Insert(0, new ListItem("Επιλογή Γραμματίου ...", "0"));
            DropDownList4.DataBind();

            TextBox10.Text = DropDownList14.SelectedItem.ToString();
            TextBox7.Text  = "";
            DropDownList4.SelectedIndex  = 0;
            DropDownList19.SelectedIndex = 0;
            DropDownList19.Enabled       = false;
        }
Ejemplo n.º 14
0
    protected void GridViewUF_SelectedIndexChanged(object sender, EventArgs e)
    {
        LabelTitolModal.Text = "Modificar";
        //Rellenaras los datos.
        GridViewRow row = GridViewUF.SelectedRow;

        String id = row.Cells[2].Text;

        LabelIdModificar.Text = id;

        ufs uf = BD.ConsultaUF(Convert.ToInt32(id));

        String nom = uf.nom.ToString();

        TextBoxNomUF.Text = nom;

        String cicle = uf.moduls_prof.cursos.id_cicle.ToString();

        DropDownList3.ClearSelection();
        DropDownList3_CascadingDropDown.SelectedValue = cicle;

        String id_curs = uf.moduls_prof.id_curs.ToString();

        DropDownList4.ClearSelection();
        DropDownList4_CascadingDropDown.SelectedValue = id_curs;

        String id_modul = uf.id_modul_prof.ToString();

        DropDownList5.ClearSelection();
        DropDownList5_CascadingDropDown.SelectedValue = id_modul;

        ButtonNou_ModalPopupExtender.Show();
    }
Ejemplo n.º 15
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            Areas ObjArea = new Areas();

            try
            {
                bool RespuestaSql = ObjArea.ModificarArea(DropDownList4.Text, TextBox2.Text);

                if (RespuestaSql == true)
                {
                    DropDownList3.DataBind();
                    DropDownList6.DataBind();
                    DropDownList5.DataBind();
                    DropDownList4.DataBind();
                    MessageBox.alert("Se ha modificado el area con exito");
                    GridView1.Visible = false;
                    TextBox2.Text     = "";
                }
                else
                {
                    MessageBox.alert(ObjArea.Mensaje);
                }
            }
            catch (Exception Ex)
            { MessageBox.alert("Error!: " + Ex.Message + " " + ObjArea.Mensaje); }
        }
Ejemplo n.º 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DropDownList1.DataSource     = Dept;
         DropDownList1.DataTextField  = "Name";
         DropDownList1.DataValueField = "Dept_ID";
         DropDownList1.DataBind();
         DropDownList2.DataSource     = Employee;
         DropDownList2.DataTextField  = "Name";
         DropDownList2.DataValueField = "Employee_ID";
         DropDownList2.DataBind();
         DropDownList3.DataSource     = StoreHouse;
         DropDownList3.DataTextField  = "Address";
         DropDownList3.DataValueField = "StoreHouse_ID";
         DropDownList3.DataBind();
         DropDownList5.DataSource     = Customer;
         DropDownList5.DataTextField  = "Name";
         DropDownList5.DataValueField = "Customer_ID";
         DropDownList5.DataBind();
         DropDownList2.SelectedValue = UserModel.Employee_ID.ToString();
     }
     Button4.Attributes.Add("onclick", "return false;");
     Button2.Attributes.Add("onclick", "return confirm(\"确认销售信息吗?\")");
 }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SqlCommand cmd = new SqlCommand("Select * from Bus_Company", con);

                con.Open();

                DropDownList5.DataSource     = cmd.ExecuteReader();
                DropDownList5.DataTextField  = "company_name";
                DropDownList5.DataValueField = "buscomponay_id";
                DropDownList5.DataBind();

                con.Close();
            }



            if (!IsPostBack)
            {
                SqlCommand cmd = new SqlCommand("Select bus_id from Bus", con);

                con.Open();

                DropDownList4.DataSource     = cmd.ExecuteReader();
                DropDownList4.DataTextField  = "bus_id";
                DropDownList4.DataValueField = "bus_id";
                DropDownList4.DataBind();

                con.Close();
            }

            Submit.Attributes.Add("onclick", " javascript : alert(' Trip Succesfully Added');");
            Submit.Attributes.Add("onclick", " javascript : return confirm (' Are you sure want to add this Trip ?');");
        }
Ejemplo n.º 18
0
        protected void Button6_Click(object sender, EventArgs e)
        {
            Asignaturas ObjAsignatura = new Asignaturas();

            try
            {
                ObjAsignatura.Nombre = DropDownList3.Text;

                bool RespuestaSql = ObjAsignatura.EliminarAsignatura();

                if (RespuestaSql == true)

                {
                    GridView1.Visible = false;
                    DropDownList3.DataBind();
                    DropDownList6.DataBind();
                    DropDownList5.DataBind();
                    DropDownList4.DataBind();
                    MessageBox.alert("Se ha borrado la asignatura correctamente");
                    TextBox1.Text = "";
                }

                else
                {
                    MessageBox.alert(ObjAsignatura.Mensaje);
                }
            }
            catch (Exception Ex)
            { MessageBox.alert("Error!: " + Ex.Message + " " + ObjAsignatura.Mensaje); }
        }
    protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
    {
        sql_temp1 = @"

         select t.* from pp_mode_data_his t
where 1=1
and t.moduale='{2}'
and t.equiptype='{3}'
and t.product_type='{4}'
and t.layer='{5}'
and t.dttm>=to_date('{0}','yyyy/MM/dd')
and t.dttm<to_date('{1}','yyyy/MM/dd')
order by t.moduale, t.equiptype, t.product_type, t.layer 

";

        sql_temp1 = string.Format(sql_temp1, txtEstimateSTARTTIME.SelectedDate.Value.ToString("yyyy/MM/dd"), txtEstimateEndTime.SelectedDate.Value.ToString("yyyy/MM/dd"), DropDownList1.SelectedValue.ToString(), DropDownList2.SelectedValue.ToString(), DropDownList3.SelectedValue.ToString(), DropDownList4.SelectedValue.ToString());

        ds_temp1 = func.get_dataSet_access(sql_temp1, conn1);

        dt_temp = ds_temp1.Tables[0].DefaultView.ToTable(true, "productid");

        DropDownList5.DataTextField = "productid";

        DropDownList5.DataSource = dt_temp;

        DropDownList5.DataBind();

        DropDownList5.Items.Insert(0, "ALL");
    }
    private void show_location()
    {
        if (User.Identity.IsAuthenticated)
        {
            SqlConnection con1000 = new SqlConnection(ConfigurationManager.AppSettings["connection"]);
            SqlCommand    cmd1000 = new SqlCommand("select * from user_details where company_name='" + User.Identity.Name + "'", con1000);
            SqlDataReader dr1000;
            con1000.Open();
            dr1000 = cmd1000.ExecuteReader();
            if (dr1000.Read())
            {
                SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connection"]);
                SqlCommand    cmd = new SqlCommand("Select * from location where Com_Id='" + company_id + "' ORDER BY loc_id asc", con);
                con.Open();
                DataSet        ds = new DataSet();
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(ds);

                DropDownList5.DataSource     = ds;
                DropDownList5.DataTextField  = "loc_name";
                DropDownList5.DataValueField = "loc_id";
                DropDownList5.DataBind();
                DropDownList5.Items.Insert(0, new ListItem("Select Unit", "0"));

                con.Close();
            }
            con1000.Close();
        }
    }
Ejemplo n.º 21
0
        protected void Button13_Click(object sender, EventArgs e)
        {
            int dt = controllerObj.Deleteservice(DropDownList5.Text.ToString(), DropDownList6.Text.ToString());

            DropDownList3.DataBind();
            DropDownList5.DataBind();
        }
Ejemplo n.º 22
0
        protected void Button16_Click(object sender, EventArgs e)
        {
            int dt = controllerObj.DeleteServiceFromOffer(Convert.ToInt32(DropDownList4.Text.ToString()), DropDownList3.Text.ToString(), DropDownList8.Text.ToString());

            DropDownList3.DataBind();
            DropDownList5.DataBind();
        }
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            int Etos_leit = Convert.ToInt16(DropDownList1.SelectedValue);
            int Type_D    = Convert.ToInt16(DropDownList3.SelectedValue);


            DropDownList5.Items.Clear();
            DropDownList5.DataBind();
            DropDownList5.Items.Insert(0, new ListItem("Επιλογή Μηνός ...", "0"));
            DropDownList5.SelectedValue = "0";
            TextBox6.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Leit_Xrisi(Etos_leit, Type_D).ToString();

            int Xrisi_l = FINANCIAL_MANAGEMENT.App_Code.xrisi.Leit_Xrisi(Etos_leit, Type_D);

            Leti_gr        = FINANCIAL_MANAGEMENT.App_Code.xrisi.Leit_Gramm(Etos_leit, Type_D, Xrisi_l);
            TextBox38.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Leit_Dapanes(Type_D, Etos_leit, Xrisi_l).ToString();
            TextBox28.Text = Leti_gr.ToString();
            if (Leti_gr > 0)
            {
                //   Label30.Visible = true;
                ///   DropDownList5.Visible = true;
                //  validate3.Enabled = true;
                TextBox28.Text   = Leti_gr.ToString();
                calEx1.StartDate = FINANCIAL_MANAGEMENT.App_Code.xrisi.Date_Start_leitourgika_with_GR(Etos_leit, Type_D, Xrisi_l);
            }
            else
            {
                //Label30.Visible = false;
                // DropDownList5.Visible = false;
                //  validate3.Enabled = false;
                TextBox28.Text   = null;
                calEx1.StartDate = FINANCIAL_MANAGEMENT.App_Code.xrisi.Date_Start_leitourgika(Etos_leit, Type_D, Xrisi_l);
            }
            TextBox39.Text = DropDownList3.SelectedValue;
        }
Ejemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <string>   list   = new List <string>();
                List <Tbl_User> lUsers = new List <Tbl_User>();
                Msg             msg    = UserLoginModel.GetAllUser();
                if (msg.Status)
                {
                    lUsers = msg.UserData as List <Tbl_User>;

                    for (int i = 0; i < lUsers.Count; i++)
                    {
                        list.Add("用户名:" + lUsers[i].Name);
                    }
                    ViewState["lUsers"] = lUsers;

                    DropDownList2.DataSource = list;
                    DropDownList2.DataBind();
                    DropDownList3.DataSource = list;
                    DropDownList3.DataBind();
                    DropDownList4.DataSource = list;
                    DropDownList4.DataBind();
                    DropDownList5.DataSource = list;
                    DropDownList5.DataBind();
                }
            }
        }
Ejemplo n.º 25
0
    private void Load_DocumentTypes()
    {
        if (DropDownList1.Items.Count == 0)
        {
            DataTable dt = objDMSBLL.GetDocumentTypeList();
            DropDownList1.DataSource = dt;
            DropDownList1.DataBind();
            DropDownList1.Items.Insert(0, new ListItem("-Select-", "0"));

            DropDownList2.DataSource = dt;
            DropDownList2.DataBind();
            DropDownList2.Items.Insert(0, new ListItem("-Select-", "0"));

            DropDownList3.DataSource = dt;
            DropDownList3.DataBind();
            DropDownList3.Items.Insert(0, new ListItem("-Select-", "0"));

            DropDownList4.DataSource = dt;
            DropDownList4.DataBind();
            DropDownList4.Items.Insert(0, new ListItem("-Select-", "0"));

            DropDownList5.DataSource = dt;
            DropDownList5.DataBind();
            DropDownList5.Items.Insert(0, new ListItem("-Select-", "0"));
        }
    }
Ejemplo n.º 26
0
 //绑定调入仓库1
 protected void BindKufang_in1()
 {
     DropDownList5.DataSource     = db.Select_IMStoreALL();
     DropDownList5.DataTextField  = "IMS_StoreName";
     DropDownList5.DataValueField = "IMS_StoreID";
     DropDownList5.DataBind();
 }
Ejemplo n.º 27
0
 protected void insertcity_Click(object sender, EventArgs e)
 {
     if ((TextBox1.Text != ""))
     {
         int t = controllerObj.insertcity(TextBox1.Text, Convert.ToInt32(DropDownList6.SelectedValue));
         if (t == 0)
         {
             Label1.Text = "this city is already exist .";
         }
         else
         {
             Label1.Text = "this city inserts corectly .";
         }
         DropDownList7.DataBind();
         DropDownList6.DataBind();
         DropDownList5.DataBind();
         DropDownList4.DataBind();
         DropDownList3.DataBind();
         DropDownList2.DataBind();   // to make change which happens when delete and insert apeare in other droplists
         DropDownList11.DataBind();
         DropDownList12.DataBind();
         DropDownList13.DataBind();
     }
     else
     {
         Label1.Text = "You enter missing data !!.";
     }
 }
Ejemplo n.º 28
0
        protected void Date_Change()
        {
            if (DropDownList8.SelectedValue == "0")
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('! Δεν έχει επιλεγεί έτος !!!!');", true);
            }
            else
            {
                TextBox26.Text = DateTime.Parse(TextBox8.Text).Month.ToString();

                DropDownList5.Items.Clear();
                DropDownList5.DataBind();
                DropDownList5.Items.Insert(0, new ListItem("Επιλογή Μηνός ...", "0"));
                DropDownList5.SelectedIndex = 0;

                if (GridView6.Rows.Count > 0)
                {
                    if (Convert.ToDateTime(TextBox8.Text) < Convert.ToDateTime(GridView6.Rows[0].Cells[0].Text))
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert('! Υπάρχει Γραμμάτιο με νεότερη ημερομηνία !!!!');", true);
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }
            if (!Page.IsPostBack)
            {
                con.Open();
                SqlCommand cmd = con.CreateCommand();
                cmd.CommandType          = CommandType.Text;
                cmd.CommandText          = "Select *from person where type='Student'";
                DropDownList1.DataSource = cmd.ExecuteReader();
                DropDownList1.DataBind();
                DropDownList1.Items.Insert(0, new ListItem("--Select--", "0"));
                con.Close();

                con.Open();
                cmd.CommandType          = CommandType.Text;
                cmd.CommandText          = "Select *from person where type='Student'";
                DropDownList2.DataSource = cmd.ExecuteReader();
                DropDownList2.DataBind();
                DropDownList2.Items.Insert(0, new ListItem("--Select--", "0"));
                con.Close();

                con.Open();
                cmd.CommandType          = CommandType.Text;
                cmd.CommandText          = "Select *from person where type='Student'";
                DropDownList3.DataSource = cmd.ExecuteReader();
                DropDownList3.DataBind();
                DropDownList3.Items.Insert(0, new ListItem("--Select--", "0"));
                con.Close();

                con.Open();
                cmd.CommandType          = CommandType.Text;
                cmd.CommandText          = "Select *from person where type='Student'";
                DropDownList4.DataSource = cmd.ExecuteReader();
                DropDownList4.DataBind();
                DropDownList4.Items.Insert(0, new ListItem("--Select--", "0"));
                con.Close();

                con.Open();
                cmd.CommandType          = CommandType.Text;
                cmd.CommandText          = "Select *from projects";
                DropDownList5.DataSource = cmd.ExecuteReader();
                DropDownList5.DataBind();
                DropDownList5.Items.Insert(0, new ListItem("--Select--", "0"));
                con.Close();


                con.Open();
                cmd.CommandType          = CommandType.Text;
                cmd.CommandText          = "Select *from person where type='Teacher'";
                DropDownList6.DataSource = cmd.ExecuteReader();
                DropDownList6.DataBind();
                DropDownList6.Items.Insert(0, new ListItem("--Select--", "0"));
                con.Close();
            }
        }
Ejemplo n.º 30
0
 //DropDownList5下拉表绑定
 private void BindDropDownList5()
 {
     DropDownList5.DataSource     = equipTypeL.Search_EquipTypeTableInfo("");
     DropDownList5.DataTextField  = "ETT_Type";
     DropDownList5.DataValueField = "ETT_ID";
     DropDownList5.DataBind();
     DropDownList5.Items.Insert(0, new ListItem("请选择", ""));
 }