Ejemplo n.º 1
0
        private void AutogeneratePid()
        {
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            string pid = objbll.AutogeneratePickPoint();

            txtpid.Text = pid;
        }
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName.ToString() == "cmddelete")
     {
         int         rowindex = Convert.ToInt32(e.CommandArgument.ToString());
         GridViewRow row      = (GridViewRow)GridView1.Rows[rowindex];
         Label       l        = (Label)row.FindControl("Label1");
         Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
         objbo.Did = l.Text;
         Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
         int i = objbll.DeleteDestinationpoint(objbo);
         FillDpoints();
     }
     else if (e.CommandName.ToString() == "cmdupdate")
     {
         int         rowindex = Convert.ToInt32(e.CommandArgument.ToString());
         GridViewRow row      = (GridViewRow)GridView1.Rows[rowindex];
         Label       l        = (Label)row.FindControl("Label1");
         Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
         objbo.Did = l.Text;
         Label l1 = (Label)row.FindControl("Label2");
         objbo.Dname      = l1.Text;
         Session["did"]   = l.Text;
         Session["dname"] = l1.Text;
         Response.Redirect("updateDpoints.aspx");
     }
 }
        private void AutogenerateDid()
        {
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            string s = objbll.AutogenerateDid();

            TextBox1.Text = s;
        }
        private void FillDpoints()
        {
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            DataSet ds = objbll.ViewDpoints();

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
        private void BindPickuppoints()
        {
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            DataSet ds = objbll.Viewpickpoints();

            DropDownList2.DataSource     = ds;
            DropDownList2.DataTextField  = "pname";
            DropDownList2.DataValueField = "pid";
            DropDownList2.DataBind();
        }
        private void BindSvno()
        {
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            SqlDataReader dr = objbll.Bindserviceno();

            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    string svno   = dr[0].ToString();
                    string fplace = dr[1].ToString();
                    string tplace = dr[2].ToString();
                    string s      = svno + "/" + fplace + "/" + tplace;
                    DropDownList1.Items.Add(s);
                }
            }
        }
Ejemplo n.º 7
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.Did   = TextBox1.Text;
            objbo.Dname = TextBox2.Text;
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.UpdateDestination(objbo);

            if (i == 1)
            {
                Response.Write("Updated");
            }
            else
            {
                Response.Write("update failed");
            }
        }
Ejemplo n.º 8
0
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.pid = GridView1.DataKeys[e.RowIndex].Value.ToString();
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.Deletepickuppoint(objbo);

            if (i == 1)
            {
                Fillpickuppoints();
                Response.Write("PICKUPPOINT DELETED SUCCESSFULLY");
            }
            else
            {
                Response.Write("FAILED");
            }
        }
Ejemplo n.º 9
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.pid   = txtpid.Text;
            objbo.pname = txtpname.Text;
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.Addpickuppoint(objbo);

            if (i == 1)
            {
                Response.Write("ADDED");
                txtpname.Text = "";
                AutogeneratePid();
            }
            else
            {
                Response.Write("FAILED");
            }
        }
Ejemplo n.º 10
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.pid = DropDownList2.SelectedValue.ToString();
            string s = DropDownList1.SelectedItem.ToString();

            string[] s1 = s.Split('/');
            objbo.Serviceno = s1[0].ToString();
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.Addbuspickuppoints(objbo);

            if (i == 1)
            {
                Response.Write("ADDED");
            }
            else
            {
                Response.Write("FAILED");
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.Did   = TextBox1.Text;
            objbo.Dname = TextBox1.Text;
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.Adddestinationpoint(objbo);

            if (i == 1)
            {
                TextBox2.Text = "";
                string s = objbll.AutogenerateDid();
                TextBox1.Text = s;
                Response.Write("Record inserted");
            }
            else
            {
                Response.Write("failed");
            }
        }