コード例 #1
0
 protected void lnkBrndNew_Click(object sender, EventArgs e)
 {
     MPBrands.Show();
     txtVeckType.SelectedIndex = 0;
     txtBrnad.Text             = "";
 }
コード例 #2
0
    protected void btnAddVehicle_Click(object sender, EventArgs e)
    {
        Boolean Sttaus = false, Sttaus1 = false;

        if (rbt_VechGrop.Items[0].Selected == true)
        {
            Sttaus = true;
        }
        else
        {
            Sttaus = false;
        }
        if (rbt_VechGrop.Items[1].Selected == true)
        {
            Sttaus1 = true;
        }
        else
        {
            Sttaus1 = false;
        }

        if (txtVeckType.Text != "0")
        {
            if (txtBrnad.Text != "")
            {
                if (Sttaus == true || Sttaus1 == true)
                {
                    //if brand is existed or not UCE

                    txtBrnad.Text = Regex.Replace(txtBrnad.Text, @"\s+", "");
                    DataSet checkrecord = objHotLeadBL.CheckRecordexist(txtBrnad.Text.Trim());
                    if (checkrecord.Tables[0].Rows.Count == 0)
                    {
                        objHotLeadBL.SaveNewBrands(txtVeckType.Text, txtBrnad.Text, Sttaus);

                        System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('New Brand is added successfully.');", true);
                        MPBrands.Hide();
                        GetBrands();
                    }
                    else
                    {
                        System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('Brand already existed.');", true);
                    }
                }
                else
                {
                    System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('please select status.');", true);
                }
            }
            else
            {
                System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('please enter Brand.');", true);
                MPBrands.Show();
                txtBrnad.Focus();
            }
        }

        else
        {
            txtVeckType.Focus();
            System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('please select product.');", true);
            MPBrands.Show();
        }
    }
コード例 #3
0
 //added on demand
 protected void lnkgroups_Click(object sender, EventArgs e)
 {
     MPBrands.Show();
 }