示例#1
0
        protected void P17_Button_Reject_Click(object sender, EventArgs e)
        {
            P17_HiddenField_Reject_Approve.Value = "1";

            if (P17_HiddenField_VR_Id.Value != "")
            {
                P17_SqlDataSource_Pending.Insert();
                P17_GridView_Pending.DataBind();
                P17_GridView_ApprovedRejected.DataBind();
                P17_HiddenField_VR_Id.Value = "";
            }
            P17_TextBox_Remarks.Text = "";
            //P17_TextBox_Remarks.Visible = false;
            //P17_Button_Approve.Visible = false;
            //P17_Button_Reject.Visible = false;
            Panel17A.Visible = false;
        }
示例#2
0
        protected void Button10_Click(object sender, EventArgs e)
        {
            GridViewRow gvRow = (GridViewRow)(sender as Control).Parent.Parent.Parent;

            int         index = gvRow.RowIndex;
            HiddenField HiddenField_Main_Id = (HiddenField)P17_GridViewAllreadyReservedV.Rows[index].FindControl("HiddenField_Main_Id");

            P17_HiddenFieldBind_ID.Value = HiddenField_Main_Id.Value;

            TextBox StartDate = (TextBox)P17_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateChooser1");
            TextBox EndDate   = (TextBox)P17_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateChooser2");
            TextBox StartTime = (TextBox)P17_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateTimeEdit1");
            TextBox EndTime   = (TextBox)P17_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateTimeEdit2");
            //TextBox
            TextBox TextBox22 = (TextBox)P17_GridViewAllreadyReservedV.Rows[index].FindControl("TextBox22");

            // HiddenField P17_HiddenField_BindDestination = (HiddenField)P17_GridViewAllreadyReservedV.Rows[index].FindControl("P17_HiddenField_BindDestination");
            // StartDate.Value = DateTime.Now;
            P17_HiddenField_BindDestination.Value = TextBox22.Text;
            DateTime t1 = Convert.ToDateTime(StartDate.Text);
            DateTime t2 = Convert.ToDateTime(StartTime.Text);

            P17_HiddenField_BindStartDate.Value = t1.ToShortDateString() + " " + t2.ToLongTimeString();

            t1 = Convert.ToDateTime(EndDate.Text);
            t2 = Convert.ToDateTime(EndTime.Text);
            P17_HiddenField_BindEndDate.Value = t1.ToShortDateString() + " " + t2.ToLongTimeString();


            P17_HiddenField_Reject_Approve.Value = "2";

            if (P17_HiddenField_VR_Id.Value != "")
            {
                P17_SqlDataSource_Pending.Insert();
                P17_SqlDataSource_Bind.Insert();
                P17_GridView_Pending.DataBind();

                P17_GridView_ApprovedRejected.DataBind();
                P17_HiddenField_VR_Id.Value = "";
            }
            P17_TextBox_Remarks.Text = "";
            Panel17A.Visible         = false;

            //Panel Panel17AA = (Panel)GridView6.Rows[index].FindControl("Panel17AA");
            //Panel17AA.Visible = false;
        }
示例#3
0
 protected void Button9_Click(object sender, EventArgs e)
 {
     P17_HiddenField_Reject_Approve.Value = "2";
     if (P17_HiddenField_Vehicle_SelectedID.Value == "")
     {
         Label54.Visible = true;
     }
     else
     {
         if (P17_HiddenField_VR_Id.Value != "")
         {
             P17_SqlDataSource_Pending.Insert();
             P17_SqlDataSource_DirectApprove.Insert();
             P17_GridView_Pending.DataBind();
             P17_GridView_ApprovedRejected.DataBind();
             P17_HiddenField_VR_Id.Value = "";
             P17_HiddenField_Vehicle_SelectedID.Value = "";
         }
         P17_TextBox_Remarks.Text = "";
         Panel17A.Visible         = false;
     }
 }