Esempio n. 1
0
    protected void btnyes_Click(object sender, EventArgs e)
    {
        Punch_Fine_Info inf = new Punch_Fine_Info();
        Punch_Fine_Sp   sp  = new Punch_Fine_Sp();

        sp.Delete_Punch_Fine();
        //Label4.Visible = true;
        MultiView1.SetActiveView(View1);
    }
Esempio n. 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Punch_Fine_Info info = new Punch_Fine_Info();
        Punch_Fine_Sp   sp   = new Punch_Fine_Sp();

        info.Punch_Fine_Date = DateTime.Parse(lbdate.Text);
        info.Brt_Id          = int.Parse(GridView1.SelectedValue.ToString());
        info.Punch_name      = Session["username"].ToString();
        info.Punched_Time    = DateTime.Parse(lbarrtime.Text);
        info.Late_By         = Label1.Text;
        info.Fine_Amount     = float.Parse(txtfine.Text);
        info.Bus_no          = lbbus_no.Text;
        info.Late_By         = Label1.Text;

        sp.Add_Punch_Fine(info);
        //for (int j = 0; j <= arr.Count; j++)
        //{
        //if(arr[j][2]==info.Brt_Id)
        //{
        //    int index = arr.IndexOf(arr[j][2]);
        //    arr.RemoveAt(index);
        //}
        //}
        int index = 0;

        foreach (add_trip_info inf in arr)
        {
            if (inf.Brt_id == info.Brt_Id)
            {
                break;
            }
            index++;
        }
        arr.RemoveAt(index);
        GridView1.DataSource = arr;
        GridView1.DataBind();

        MultiView1.SetActiveView(View1);
    }