Exemplo n.º 1
0
    protected void gvPayment_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
        lblID.Text = commandArgs[0];
        string TypeID = commandArgs[1];

        // lblID.Text = e.CommandArgument.ToString();
        if (e.CommandName == "Ed")
        {
            GetPayment(lblID.Text);
        }

        else if (e.CommandName == "Del")
        {
            using (ConClass obj = new ConClass())
            {
                obj.execNonQuery("Delete from CartLicense where ID=" + commandArgs[0]);
                gvPayment.DataBind();
            }
        }
        else if (e.CommandName == "print")
        {
            Session["CartLicenseID"] = commandArgs[0];
            if (TypeID == "1")
            {
                Response.Redirect("~/Reports/PrintCartCertificate.aspx");
            }
            else if (TypeID == "2")
            {
                Response.Redirect("~/Reports/PrintCartIDCard.aspx");
            }
        }
    }
Exemplo n.º 2
0
 protected void btnVerify_Click(object sender, EventArgs e)
 {
     using (ConClass obj = new ConClass())
     {
         obj.execNonQuery("update business set IsVerified=1 where ID=" + Session["BusinessID"].ToString());
     }
     Response.Redirect("BusinessToVerify.aspx");
 }
Exemplo n.º 3
0
    protected void gvGroup_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        lblID.Text = e.CommandArgument.ToString();
        if (e.CommandName == "Ed")
        {
            GetGroup(lblID.Text);
        }

        else if (e.CommandName == "Del")
        {
            obj.execNonQuery("Delete from DistrictTarget where ID=" + e.CommandArgument.ToString());
            gvGroup.DataBind();
        }
    }
Exemplo n.º 4
0
    protected void gvPayment_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        lblID.Text = e.CommandArgument.ToString();
        if (e.CommandName == "Ed")
        {
            GetPayment(lblID.Text);
        }

        else if (e.CommandName == "Del")
        {
            using (ConClass obj = new ConClass())
            {
                obj.execNonQuery("Delete from payment where ID=" + e.CommandArgument.ToString());
                gvPayment.DataBind();
            }
        }
    }
Exemplo n.º 5
0
    protected void gvPayment_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        lblID.Text = e.CommandArgument.ToString();
        if (e.CommandName == "download")
        {
            Openfile(e.CommandArgument.ToString());
        }

        else if (e.CommandName == "Del")
        {
            using (ConClass obj = new ConClass())
            {
                obj.execNonQuery("Delete from BusinessFile where ID=" + e.CommandArgument.ToString());
                gvPayment.DataBind();
                Clear();
            }
        }
    }
Exemplo n.º 6
0
    protected void gvPayment_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        lblID.Text = e.CommandArgument.ToString();
        if (e.CommandName == "Ed")
        {
            GetPayment(lblID.Text);
        }

        else if (e.CommandName == "Del")
        {
            using (ConClass obj = new ConClass())
            {
                obj.execNonQuery("Delete from BusinessLicense where ID=" + e.CommandArgument.ToString());
                gvPayment.DataBind();
            }
        }
        else if (e.CommandName == "print")
        {
            Session["LicenseID"] = e.CommandArgument.ToString();
            Response.Redirect("~/Reports/PrintCertificate.aspx");
        }
    }
Exemplo n.º 7
0
 protected void gvGroup_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     lblID.Text = e.CommandArgument.ToString();
     if (e.CommandName == "Ed")
     {
         //Session["BusinessID"] = lblID.Text;
         Response.Redirect("Create.aspx?ID=" + lblID.Text);
     }
     else if (e.CommandName == "Del")
     {
         using (ConClass obj = new ConClass())
         {
             obj.execNonQuery("Delete from payment where businessID=" + e.CommandArgument.ToString() + "; Delete from businesslicense where businessID=" + e.CommandArgument.ToString() + "; delete from business where ID=" + e.CommandArgument.ToString());
             gvGroup.DataBind();
         }
     }
     else if (e.CommandName == "View")
     {
         Session["BusinessID"] = lblID.Text;
         Response.Redirect("ViewBusiness.aspx");
     }
 }
Exemplo n.º 8
0
    protected void gvPayment_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
        lblID.Text = commandArgs[0];
        string YearID = commandArgs[1];

        if (e.CommandName == "Ed")
        {
            GetPayment(lblID.Text);
        }

        else if (e.CommandName == "Del")
        {
            using (ConClass obj = new ConClass())
            {
                obj.execNonQuery("Delete from payment where ID=" + lblID.Text);
                gvPayment.DataBind();
            }
        }
        else if (e.CommandName == "Print")
        {
            Response.Redirect(@"~/Reports/Tarufa3.aspx?ID=" + lblID.Text);
        }
    }