Пример #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                CheckBox chk = ((CheckBox)(GridView1.Rows[i].FindControl("CheckBox1")));
                if (chk.Checked)
                {
                    GridViewRow gr = GridView1.Rows[i];
                    int customer_id = int.Parse(((Label)(gr.FindControl("Label2"))).Text);
                    int porting_id = int.Parse(((Label)(gr.FindControl("Label1"))).Text);
                    customer_keeper ck = new customer_keeper();
                    customer_class cc = ck.GetData(customer_id );
                    dealer_keeper dk = new dealer_keeper();
                    
                    port_keeper pk = new port_keeper();
                    port_class pc = pk.GetDataFull(porting_id);
                    cc._address = pc._new_address;
                    cc._dealer_id = pc._new_dist_id;
                    dealer_class dc = dk.GetFullDealerData(pc._new_dist_id);
                    cc._dist = dc._name; 
                    pc._status = "Accepted";
                    pk.update(pc);
                    ck.update(cc);
                    GetData();
                    

                }
            }
        }
Пример #2
0
        private void GetData()
        {
            customer_keeper ck = new customer_keeper();
            ArrayList arr = ck.GetDataByDealer(int.Parse(Session["dealer_id"].ToString())) ;



            Session["da"] = arr[0];
            Session["ds"] = arr[1];

        }
Пример #3
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                CheckBox chk = ((CheckBox)(GridView1.Rows[i].FindControl("CheckBox1")));
                if (chk.Checked)
                {
                    GridViewRow gr = GridView1.Rows[i];
                    int id = int.Parse(((Label)(gr.FindControl("Label7"))).Text);
                    customer_keeper ck = new customer_keeper();
                    customer_class cc = ck.GetData(id);
                    cc._status = "Accepted";
                    cc._dealer_id = int.Parse(Session["dealer_id"].ToString());
                    cc._renewal = DateTime.Today.AddMonths(12);
                    ck.update(cc); 
                    GetData();
                    SetData();

                }
            }
        }
Пример #4
0
        private void GetData()
        {
            customer_keeper ck = new customer_keeper();
            ArrayList arr = ck.GetDataByDealerFiltered (int.Parse(Session["dealer_id"].ToString()))    ;

            ArrayList del = new ArrayList(); 

            SqlDataAdapter da = (SqlDataAdapter ) arr[0];
            DataSet ds = (DataSet ) arr[1];
            
            
            /*foreach (DataRow dr in del)
            {
                dr.Delete();
                continue; 
            }*/

            Session["da"] = da;
            Session["ds"] = ds;


        }