<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InstUpd_CanalesContables.aspx.cs"
    Inherits="InstUpd_CanalesContables" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="estilos/Estilos.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <script type="text/javascript">
            function CloseAndRebind(args) {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }

            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

                return oWindow;
            }

            function CancelEdit() {
                GetRadWindow().Close();
            }

        </script>

        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <table align="center" cellspacing="0" cellpadding="0"  border="0" style="padding-right: 7px">
            <tr align="center" style="background-color: #ffffff">
                <td style="height: 41px;" valign="middle">
                    <table id="tablaMantenimiento" runat="server" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td>
                                <table width="500" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid"
                                    bordercolor="#557961" class="tablatitulo">
                                    <tr background="images/bg_tabla.jpg">
                                        <td height="3" align="center" style="background-color: #CCCCCC; border-bottom: 1px solid">
                                        </td>
                                    </tr>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                    <tr>
                                        <td width="22%" height="28" align="right" class="Cont_form">
                                            Codigo :
                                        </td>
                                        <td style="padding-left: 22px" align="left">
                                            <telerik:RadTextBox ID="txtNomenclatura" runat="server" MaxLength="5" Width="50px"
                                                Skin="Outlook" onChange="javascript:this.value=this.value.toUpperCase();" SelectionOnFocus="CaretToBeginning"
                                                CssClass="MyEnabledTextBox">
                                                <EmptyMessageStyle CssClass="MyEmptyTextBox" />
                                                <EnabledStyle CssClass="MyEnabledTextBox" />
                                                <FocusedStyle CssClass="MyFocusedTextBox" />
                                                <HoveredStyle CssClass="MyHoveredTextBox" />
                                                <InvalidStyle CssClass="MyInvalidTextBox" />
                                            </telerik:RadTextBox>
                                            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtNomenclatura"
                                                ErrorMessage="Ingrese el Codigo del Canal Contable." SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtNomenclatura"
                                                ErrorMessage="Ingrese letras o números" ValidationExpression="^[a-zA-Z0-9]{0,}$"
                                                SetFocusOnError="True"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="28" align="right" class="Cont_form">
                                            Nombre :
                                        </td>
                                        <td style="padding-left: 22px" align="left">
                                            <telerik:RadTextBox ID="txtNombre" runat="server" CssClass="MyEnabledTextBox" Width="298px"
                                                MaxLength="80" Skin="Outlook">
                                                <EmptyMessageStyle CssClass="MyEmptyTextBox" />
                                                <EnabledStyle CssClass="MyEnabledTextBox" />
                                                <FocusedStyle CssClass="MyFocusedTextBox" />
                                                <HoveredStyle CssClass="MyHoveredTextBox" />
                                                <InvalidStyle CssClass="MyInvalidTextBox" />
                                            </telerik:RadTextBox>
                                            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtNombre"
                                                ErrorMessage="Ingrese el Nombre del Canal Contable." SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="28" align="right" class="Cont_form">
                                            Estado :
                                        </td>
                                        <td style="padding-left: 22px" align="left">
                                            <telerik:RadComboBox ID="ddlEstado2" Width="300px" runat="server" CssClass="MyEnabledTextBox"
                                                Skin="Outlook"  
                                                AutoPostBack="false" CausesValidation="false" Height="50px" EmptyMessage="Seleccione...">
                                            </telerik:RadComboBox>
                                            <asp:RequiredFieldValidator runat="server" ID="ReqiredFieldValidator5" ControlToValidate="ddlEstado2"
                                                ErrorMessage="Seleccione el Estado." CssClass="validator" Text="*"> </asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="10" align="right" class="Cont_form">
                                        </td>
                                        <td align="left">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
        </table>
        </td> </tr>
        <tr style="background-color: #ffffff">
            <td style="height: 40px;" valign="middle" align="right">
                <table cellspacing="0" cellpadding="0" border="0" style="width: 119px">
                    <tr>
                        <td style="padding-right: 10px">
                            <span class="btn_Botones">
                                <asp:Button ID="btnGuardar" CssClass="Button" runat="server" CausesValidation="true"
                                    OnClick="btnGuardar_Click" />
                            </span>
                        </td>
                        <td style="width: 40px">
                            <span class="btn_Botones">
                                <asp:Button ID="btnVolver" runat="server" CssClass="Button" Text="Cancelar" CausesValidation="False"
                                    OnClick="btnVolver_Click" />
                            </span>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr style="background-color: #ffffff">
            <td valign="middle" align="left" class="arial10bold">
                <span id="Span1" class="validator" style="color: Red; visibility: visible;">*</span>
                Campos Obligatorios
            </td>
        </tr>
        </table>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
            ShowSummary="False" />
    </div>
    <telerik:RadInputManager ID="RadInputManager1" runat="server">
        <telerik:RegExpTextBoxSetting BehaviorID="is" ValidationExpression="[0-9]{6,}" EmptyMessage="Invalido">
            <TargetControls>
                <telerik:TargetInput ControlID="txtNomenclatura" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>
    </form>
</body>
</html>
