Beispiel #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        List <pt.Renewal> pp = getAddressServiceByID(TextBox6.Text);

        RenewalListView.DataSource = pp;
        RenewalListView.DataBind();
    }
Beispiel #2
0
    protected void EmployeesListView_OnItemCommand(object sender, ListViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Insert":
        {
            // InsertCustomer(e.Item);
            break;
        }

        case "Insert2":
        {
            //  InsertCustomer(e.Item);
            break;
        }

        case "Save":
        {
            UpdateCustomer(e.CommandArgument as string, e.Item);
            ((ListView)sender).EditIndex = -1;
            List <pt.Renewal> pp = getAddressServiceByID(TextBox6.Text);
            RenewalListView.DataSource = pp;
            RenewalListView.DataBind();
            ClientScriptManager csm = Page.ClientScript;
            string message          = "<Script Language='JavaScript'>alert(' " + "Record Updated   Successfully" + " ');</Script>";
            csm.RegisterStartupScript(this.GetType(), "Exception", message, false);
            break;
        }

        case "Del":
        {
            int vid = Convert.ToInt32(e.CommandArgument);

            flushXpwalletByID(vid);
            flushRenewalByID(vid);

            List <pt.Renewal> pp = getAddressServiceByID(TextBox6.Text);
            RenewalListView.DataSource = pp;
            RenewalListView.DataBind();
            ClientScriptManager csm = Page.ClientScript;
            string message          = "<Script Language='JavaScript'>alert(' " + "Record Deleted   Successfully" + " ');</Script>";
            csm.RegisterStartupScript(this.GetType(), "Exception", message, false);
            break;
        }

        case "Cancel":
        {
            RenewalListView.InsertItemPosition = InsertItemPosition.None;
            RenewalListView.DataBind();
            break;
        }

        case "Edit":
        {
            RenewalListView.InsertItemPosition = InsertItemPosition.None;
            break;
        }
        }
    }
Beispiel #3
0
    protected void RenewalListView_ItemCanceling(object sender, ListViewCancelEventArgs e)
    {
        ((ListView)sender).EditIndex = -1;
        List <pt.Renewal> pp = getAddressServiceByID(TextBox6.Text);

        RenewalListView.DataSource = pp;
        RenewalListView.DataBind();
    }
Beispiel #4
0
    protected void RenewalListView_ItemEditing(object sender, ListViewEditEventArgs e)
    {
        RenewalListView.EditIndex = e.NewEditIndex;
        List <pt.Renewal> pp = getAddressServiceByID(TextBox6.Text);

        RenewalListView.DataSource = pp;
        RenewalListView.DataBind();

        Page page = HttpContext.Current.CurrentHandler as Page;

        page.ClientScript.RegisterStartupScript(typeof(Page), "Test", "<script type='text/javascript'>doEdit();</script>");
    }