예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            sql = new Request2();
            sql.Open();


            if (!IsPostBack)
            {
                SqlDataReader drrr = sql.GetRequestSupplies();
                GridView1.DataSource = drrr;
                GridView1.DataBind();
                drrr.Close();


                SqlDataReader dr1 = sql.GetSupply();

                ddl1.DataSource     = dr1;
                ddl1.DataTextField  = "Name";
                ddl1.DataValueField = "Name";
                ddl1.DataBind();
                dr1.Close();

                lbld.Text = DateTime.Now.ToShortDateString();
            }
        }
예제 #2
0
        protected void ImageButton14_Click(object sender, ImageClickEventArgs e)
        {
            //sql = new Request2();
            sql.Open();

            validation v1 = new validation();

            v1.Quantity = int.Parse(qty.Text);


            sql.AddRequestSupplies(ddl1.SelectedValue, int.Parse(qty.Text), DateTime.Parse(date.Text));

            SqlDataReader daa = sql.GetRequestSupplies();

            GridView1.DataSource = daa;
            GridView1.DataBind();
            sql.Close();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            sql = new Request2();
            sql.Open();

            if (!IsPostBack)
            {
                SqlDataReader drrr = sql.GetRequestSupplies();
                GridView1.DataSource = drrr;
                GridView1.DataBind();
                drrr.Close();

                SqlDataReader dr1 = sql.GetSupply();

                ddl1.DataSource = dr1;
                ddl1.DataTextField = "Name";
                ddl1.DataValueField = "Name";
                ddl1.DataBind();
                dr1.Close();

                lbld.Text = DateTime.Now.ToShortDateString();
            }
        }