Пример #1
0
        protected void P18_Button_Reject_Click(object sender, EventArgs e)
        {
            P18_HiddenField_Reject_Approve.Value = "1";

            if (P18_HiddenField_VR_Id.Value != "")
            {
                P18_SqlDataSource_Pending.Insert();
                P18_GridView_Pending.DataBind();
                P18_GridView_ApprovedRejected.DataBind();
                P18_HiddenField_VR_Id.Value = "";
            }
            P18_TextBox_Remarks.Text = "";
            Panel18A.Visible         = false;
        }
Пример #2
0
        protected void Button12_Click(object sender, EventArgs e)
        {
            GridViewRow gvRow = (GridViewRow)(sender as Control).Parent.Parent.Parent;

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

            P18_HiddenFieldBind_ID.Value = HiddenField_Main_Id.Value;

            TextBox StartDate = (TextBox)P18_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateChooser3");
            TextBox EndDate   = (TextBox)P18_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateChooser4");
            TextBox StartTime = (TextBox)P18_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateTimeEdit3");
            TextBox EndTime   = (TextBox)P18_GridViewAllreadyReservedV.Rows[index].FindControl("WebDateTimeEdit4");
            // StartDate.Value = DateTime.Now;
            TextBox TextBox23 = (TextBox)P18_GridViewAllreadyReservedV.Rows[index].FindControl("TextBox23");

            //HiddenField P18_HiddenField_BindDestination = (HiddenField)P18_GridViewAllreadyReservedV.Rows[index].FindControl("P18_HiddenField_BindDestination");
            P18_HiddenField_BindDestination.Value = TextBox23.Text;
            DateTime t1 = Convert.ToDateTime(StartDate.Text);
            DateTime t2 = Convert.ToDateTime(StartTime.Text);

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

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


            P18_HiddenField_Reject_Approve.Value = "2";

            if (P18_HiddenField_VR_Id.Value != "")
            {
                //P18_SqlDataSource_Pending.Insert();
                P18_SqlDataSource_Bind.Insert();
                P18_GridView_Pending.DataBind();

                P18_GridView_ApprovedRejected.DataBind();
                P18_HiddenField_VR_Id.Value = "";
            }
            P18_TextBox_Remarks.Text = "";
            Panel18A.Visible         = false;

            //Panel Panel17AA = (Panel)GridView6.Rows[index].FindControl("Panel17AA");
            //Panel17AA.Visible = false;
        }