예제 #1
0
    //protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    //{
    //    try
    //    {
    //        if (RadioButtonList1.SelectedItem.Text == "Not Applicable")
    //        {
    //            dwd_vat.Text = "0";
    //            DropDownList1.Text = "0";

    //        }
    //        else
    //        {
    //            DataSet dv = new DataSet();
    //            dv = dl.selct_vat_cmp(bl);
    //            if (dv.Tables[0].Rows.Count > 0)
    //            {
    //                if (dv.Tables[0].Rows[0]["vat_tax"].ToString() != string.Empty)
    //                {
    //                    dwd_vat.Text = dv.Tables[0].Rows[0]["vat_tax"].ToString();
    //                }
    //                if (dv.Tables[0].Rows[0]["add_vat"].ToString() != string.Empty)
    //                {
    //                    DropDownList1.Text = dv.Tables[0].Rows[0]["add_vat"].ToString();
    //                }

    //            }
    //            else
    //            {

    //            }
    //        }
    //    }
    //    catch
    //    {
    //    }
    //}
    protected void txt_add_pro_TextChanged(object sender, EventArgs e)
    {
        try
        {
            bl.item_grp_nm = txt_add_pro.Text;
            DataSet ds = new DataSet();
            ds = dl.secectsubgrp(bl);
            if (ds.Tables[0].Rows.Count > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('The Item Group Already Exists'); window.location='itemgrp.aspx';", true);
            }
            txt_add_pro.Focus();
        }
        catch (Exception)
        {
        }
    }