Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         proxy = new SaleService.SaleServiceClient();
         GridView1.DataSource = proxy.GetAllCustomer();
         GridView1.DataBind();
     }
 }
Esempio n. 2
0
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int userid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values["CustomerID"].ToString());

            proxy = new SaleService.SaleServiceClient();

            bool check = proxy.DeleteCustomer(userid);

            Label1.Text          = "Record Deleted Successfully";
            GridView1.DataSource = proxy.GetAllCustomer();
            GridView1.DataBind();
        }
Esempio n. 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            proxy = new SaleService.SaleServiceClient();
            SaleService.Customer objcust = new SaleService.Customer()
            {
                CustomerID = 5, CustomerName = TextBox1.Text,
                Address    = TextBox2.Text, EmailId = TextBox3.Text
            };

            proxy.InsertCustomer(objcust);

            GridView1.DataSource = proxy.GetAllCustomer();
            GridView1.DataBind();
            Label1.Text = "Record Saved Successfully";
        }