Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["itm"] != "" && Request.QueryString["itm"] != null)
            {
                bl.item_id = Convert.ToInt32(Request.QueryString["itm"].ToString());
                DataSet ds = new DataSet();
                ds = dl.select_itm_update(bl);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    fildwd();
                    fildwdunit();
                    //  TextBox1.Text = ds.Tables[0].Rows[0]["opening_qty"].ToString();
                    TextBox4.Text = ds.Tables[0].Rows[0]["item_name"].ToString();
                    TextBox5.Text = ds.Tables[0].Rows[0]["item_code"].ToString();
                    TextBox6.Text = ds.Tables[0].Rows[0]["item_nik"].ToString();
                    TextBox7.Text = ds.Tables[0].Rows[0]["item_des"].ToString();
                    //    TextBox8.Text = ds.Tables[0].Rows[0]["mrp"].ToString();
                    //    TextBox2.Text = ds.Tables[0].Rows[0]["opening_date"].ToString();
                    dwd_grp.Text       = ds.Tables[0].Rows[0]["item_sub_id"].ToString();
                    DropDownList1.Text = ds.Tables[0].Rows[0]["unit_id"].ToString();

                    //dwd_vat.Text = ds.Tables[0].Rows[0]["tax"].ToString();
                    //dwd_vat_add.Text = ds.Tables[0].Rows[0]["add_tax"].ToString();
                    //DropDownList3.Text = ds.Tables[0].Rows[0]["cst"].ToString();
                    //dwd_exc.Text = ds.Tables[0].Rows[0]["basic_duty"].ToString();
                    txt_hsn.Text      = ds.Tables[0].Rows[0]["hsn_code"].ToString();
                    txt_tarif_no.Text = ds.Tables[0].Rows[0]["tariff_no"].ToString();
                    // DropDownList2.Text = ds.Tables[0].Rows[0]["tax"].ToString();
                    // DropDownList3.Text = ds.Tables[0].Rows[0]["cst"].ToString();



                    Button1.Visible = false;
                    Button2.Visible = true;
                }
            }
            fildwd();
            grid();
            dwd_grp.Items.Insert(0, new ListItem("---Select Group---", "0"));
            fildwdunit();
            DropDownList1.Items.Insert(0, new ListItem("---Select Unit---", "0"));

            //  DropDownList2.Items.Insert(0, new ListItem("---Select---", ""));
            // DropDownList3.Items.Insert(0, new ListItem("---Select---", ""));
        }
    }