コード例 #1
0
ファイル: rCxC.aspx.cs プロジェクト: joaf/FinanzasJoaf
        protected void BtnGuardar_Click(object sender, EventArgs e)
        {
            if (TbIdCxC.Text == string.Empty)
            {
                ObtenerDatos();


                if (cc.Insertar())
                {
                    Alert("Cuenta Por Cobrar Se Guardo Corectamente");
                    Limpiar();
                }
                else
                {
                    Alert("No Cuenta Por Cobrar Se Pudo Guardar Corectamente ");
                }
            }

            else
            {
                ObtenerDatos();

                if (cc.Modificar(TbIdCxC.Text))
                {
                    Alert("Cuenta Por Cobrar Se Modificada Corectamente");
                }
                else
                {
                    Alert("Cuenta Por Cobar No Se  Modificar Corectamente");
                }
            }
        }
コード例 #2
0
        protected void RegistrarButton_Click(object sender, EventArgs e)
        {
            CxC cxc = new CxC();

            cxc.IdTipoDocumento = Convert.ToInt32(TipoDropDownList.SelectedValue);
            cxc.IdMiembro       = Convert.ToInt32(MiembroDropDownList.SelectedValue);
            cxc.Fecha           = Convert.ToDateTime(FechaTextBox.Text);
            cxc.IdClub          = Convert.ToInt32(ClubDropDownList.SelectedValue);
            cxc.Monto           = Convert.ToDouble(MontoTextBox.Text);

            if (TipoMultaDropDownList.Visible == true)
            {
                cxc.IdTipoMulta = Convert.ToInt32(TipoMultaDropDownList.SelectedValue);
                cxc.Insertar();
            }
            else
            {
                cxc.InsertarNull();
            }
        }