Beispiel #1
0
        protected void ReceberSelecionados(object sender, EventArgs e)
        {
            try
            {
                string   f          = Request.Form["chkDocumentos"];
                string[] documentos = f.Split(',');

                foreach (string documento in documentos)
                {
                    DocumentoDAL dDAL = new DocumentoDAL();
                    dDAL.Receber(Convert.ToInt32(documento));
                }

                Response.Write("<script language='JavaScript'>alert('Documento(s) recebido(s) com sucesso');window.parent.location='../Home/Default.aspx';</script>");
            }
            catch (Exception)
            { throw; }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                DocumentoDAL dDAL = new DocumentoDAL();

                switch (Request.QueryString["act"])
                {
                case "exc":
                    Documento d = dDAL.CarregarDadosPorIdDocumento(Convert.ToInt32(Request.QueryString["idDoc"]));
                    dDAL.Excluir(d);
                    Response.Write("<script language='JavaScript'>alert('O Documento foi excluído com sucesso');location='ListarDocumentos.aspx';</script>");
                    break;

                case "rcv":
                    dDAL.Receber(Convert.ToInt32(Request.QueryString["idDoc"]));
                    Response.Write("<script language='JavaScript'>alert('O Documento foi recebido com sucesso');location='ListarDocumentos.aspx';</script>");
                    break;

                default:
                    break;
                }

                if (!Page.IsPostBack)
                {
                    // PREENCHE OS TIPOS DE DOCUMENTOS //
                    TipoDocumentoDAL tdDAL = new TipoDocumentoDAL();
                    ddlTipoDocumento.DataSource = tdDAL.Listar();
                    ddlTipoDocumento.DataBind();
                    if (Request.QueryString["idTpd"] == null)
                    {
                        ddlTipoDocumento.Items.Insert(0, (new ListItem("Selecione o tipo de documento", "")));
                    }
                    else
                    {
                        ddlTipoDocumento.SelectedValue = Request.QueryString["idTpd"];
                    }
                    // FIM //
                }
            }
            catch (Exception)
            { throw; }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                DocumentoDAL dDAL = new DocumentoDAL();

                switch (Request.QueryString["act"])
                {
                case "rcv":
                    dDAL.Receber(Convert.ToInt32(Request.QueryString["idDoc"]));
                    Response.Write("<script language='JavaScript'>alert('O Documento foi recebido com sucesso');location='ListarDocumentos.aspx';</script>");
                    break;

                default:
                    break;
                }
            }
            catch (Exception)
            { throw; }
        }