Ejemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string  bin_lat = blat.Text;
            string  bin_lon = blon.Text;
            string  name    = Request.Form["Name"];
            DataSet ds2     = new DataSet();

            //ds2 = ob.fn_insert_new_bin(name, blat.Text, blon.Text, b_name.Text, serialid.Text, DropDownList1.SelectedItem.Value.ToString(), DropDownList2.SelectedItem.Value.ToString());
            ds2 = ob.Fn_Insert_new_PU(DdlZone.SelectedItem.Text, DdlZone.SelectedValue, DdlWard.SelectedItem.Text, DdlWard.SelectedValue, name.Replace("'", "_"), blat.Text, blon.Text, f_name.Text);
            // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Bin Deployed Successfully');", true);
            if (ds2.Tables[0].Rows[0]["msg"].ToString() == "S")
            {
                MessageBox.Show("Processing Units added Successfully");
            }
            else
            if (ds2.Tables[0].Rows[0]["msg"].ToString() == "N")
            {
                MessageBox.Show(" Due to Some Problems Processing Unit not Add");
            }

            blat.Text   = "";
            blon.Text   = "";
            f_name.Text = "";
        }