示例#1
0
    //protected void LinkButton2_Click(object sender, EventArgs e)
    ////{
    ////    try
    ////    {
    ////        bl.item_grp_nm = txt_add_pro.Text;
    ////        dl.insertitemgrp(bl);
    ////        Response.Redirect("~/item_msater.aspx");
    ////    }
    ////    catch
    ////    {
    ////    }
    ////}

    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            bl.item_name   = TextBox4.Text;
            bl.item_grp_id = Convert.ToInt32(dwd_grp.SelectedValue.ToString());
            bl.nick_nm     = TextBox6.Text;
            bl.item_code   = TextBox5.Text;
            bl.item_des    = TextBox7.Text;
            //   bl.opening_qty = TextBox1.Text;
            //    bl.openinig_date = TextBox2.Text;
            bl.unit    = DropDownList1.SelectedItem.ToString();
            bl.unit_id = DropDownList1.SelectedValue.ToString();
            //    bl.mrp = TextBox8.Text;
            //  bl.qty = TextBox1.Text;
            // bl.tax = DropDownList2.SelectedValue.ToString();
            // bl.cst = DropDownList3.SelectedValue.ToString();
            // bl.tax = dwd_vat.Text;
            // bl.tax_4 = dwd_vat_add.Text;
            //  bl.ecc = "";
            //  bl.cst = DropDownList3.Text;
            bl.hsn = txt_hsn.Text;
            //  bl.basic_duty = dwd_exc.Text;
            bl.tarif_no = txt_tarif_no.Text;
            dl.insertitem(bl);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Item Created successfully'); window.location='item_msater.aspx';", true);
        }
        catch
        {
        }
    }