protected void cmdreset_Click(object sender, EventArgs e)
        {
            RadComboBox cmbcat1 = (RadComboBox)RadPanelBar1.FindItemByValue("info").FindControl("cmbservicio");
            RadComboBox cmbcat2 = (RadComboBox)RadPanelBar1.FindItemByValue("info").FindControl("cmbproducto");
            RadComboBox cmbcat3 = (RadComboBox)RadPanelBar1.FindItemByValue("info").FindControl("cmbcentro");

            RadButton rbt1 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtDefault");
            RadButton rbt2 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtRevisado");
            RadButton rbt3 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtTramite");
            RadButton rbt4 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtCancel");
            RadButton rbt5 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtaceptadopag");
            RadButton rbt6 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtarechazadopag");
            RadButton rbt9 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtnBarco");

            RadDatePicker rdp1 = (RadDatePicker)RadPanelBar1.FindItemByValue("info").FindControl("rdpFechaIni");
            RadDatePicker rdp2 = (RadDatePicker)RadPanelBar1.FindItemByValue("info").FindControl("rdpFechaFin");

            RadButton rbt7 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtAnio");
            RadButton rbt8 = (RadButton)RadPanelBar1.FindItemByValue("info").FindControl("rbtAniomes");

            cmbcat1.ClearSelection();
            cmbcat2.ClearSelection();
            cmbcat3.ClearSelection();

            rbt1.Checked = false;
            rbt2.Checked = false;
            rbt3.Checked = false;
            rbt4.Checked = false;
            rbt5.Checked = false;
            rbt6.Checked = false;
            rbt7.Checked = false;
            rbt8.Checked = false;
            rbt9.Checked = false;

            rdp1.Clear();
            rdp2.Clear();


        }
Exemple #2
0
        protected void RMCatEndDte_Start_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
        {
            RadDatePicker senderPickerEnd = sender as RadDatePicker;

            if (senderPickerEnd.SelectedDate == null)
            {
                Page.Validate("DatesinRatesEndDate_Blank");
            }
            else
            {
                Page.Validate("DatesinRatesCompare");
            }


            if (Page.IsValid == true)
            {
                // parent repeater

                RepeaterItem ParentRepeater = ((RepeaterItem)(senderPickerEnd.NamingContainer));
                //RepeaterItem childrepeaterItem = ((RepeaterItem)(senderPickerEnd.NamingContainer.NamingContainer));
                //TextBox RoomCatBox = childrepeaterItem.FindControl("Hotel_room_category") as TextBox;
                HiddenField SeasonHiddenIDEnd = ParentRepeater.FindControl("seaonNumber") as HiddenField;

                //HttpContext.Current.Response.Write(childrepeaterItem);

                senderPickerEnd.DateInput.CssClass = string.Empty;

                // child repeater
                //Repeater childrepeater = ParentRepeater.FindControl("MultipleDates") as Repeater;
                //RepeaterItem childrepeaterItem = ((RepeaterItem)(childrepeater.NamingContainer)) as RepeaterItem;
                //TextBox RoomCatBox = childrepeaterItem.FindControl("Hotel_room_category") as TextBox;

                // script manager set focus
                // Control ContainerforScrptMgr = this.FindControl("OvationRFPGlobalScrptMgr1");
                //RadScriptManager OvationControls = (RadScriptManager)ContainerforScrptMgr.FindControl("Ovationscriptmgr");

                // uncomment this for testing
                //HttpContext.Current.Response.Write("end date " + e.NewDate.Value.Date.ToShortDateString() + " " + SeasonHiddenIDEnd.Value.ToString());
                //HttpContext.Current.Response.Write(childrepeater.ClientID);

                using (SqlConnection update_Hotel_room_Rate_currency_Conn = new SqlConnection(RFPDBconnStr))
                {
                    using (SqlCommand update_Hotel_room_Rate_currency_cmd = new SqlCommand("UPDATE Tbl_Hotel_PHC_AmmenRmSeasons SET dtEDDate = @dtEDDate WHERE(LID = @LID) AND (LRFPID = @LRFPID)", update_Hotel_room_Rate_currency_Conn))
                    {
                        update_Hotel_room_Rate_currency_cmd.CommandType    = CommandType.Text;
                        update_Hotel_room_Rate_currency_cmd.CommandTimeout = 0;

                        update_Hotel_room_Rate_currency_Conn.Open();

                        update_Hotel_room_Rate_currency_cmd.Parameters.AddWithValue("@LID", SeasonHiddenIDEnd.Value.ToString());
                        update_Hotel_room_Rate_currency_cmd.Parameters.AddWithValue("@LRFPID", Decrypt(HttpContext.Current.Request.QueryString["ORFP"], "trappOvation"));
                        update_Hotel_room_Rate_currency_cmd.Parameters.AddWithValue("@dtEDDate", e.NewDate.Value.Date.ToShortDateString());
                        update_Hotel_room_Rate_currency_cmd.ExecuteNonQuery();

                        // OvationControls.SetFocus(RoomCatBox.ClientID);
                    }
                }
            }
            else
            {
                senderPickerEnd.Clear();
                //senderPickerEnd.DateInput.DisplayText = "In-Valid";
                senderPickerEnd.DateInput.CssClass = "enddateError";
                // senderPickerEnd.Focus();
            }
        }