/*Go to your Solution Explorer > right click on references and then
     * click Manage NuGet Packages. Then search in tab "Online" for
     * DocumentFormat.OpenXml and install it. After you can use DocumentFormat.OpenXml.*/
    protected void Page_Load(object sender, EventArgs e)
    {
        //Fecha - Hora del Servidor BD
        tb_cxc_fecha BE = new tb_cxc_fecha();
        tb_cxc_fechaBL BL = new tb_cxc_fechaBL();
        DataTable dt = new DataTable();
        BE.pedido = "1";
        dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];
        //String fecha = "";
        idiom.Value = "es";
        fechdoc.Text = dt.Rows[0]["fechdoc"].ToString().Substring(0, 10);
        fechdoc2.Text = dt.Rows[0]["fechdoc"].ToString().Substring(0, 10);
        fechentrega.Text = dt.Rows[0]["fechentrega"].ToString().Substring(0, 10);
        fechentrega2.Text = dt.Rows[0]["fechentrega"].ToString().Substring(0, 10);
        tfecha.Value = dt.Rows[0]["fechdoc"].ToString().Substring(0,10);

        if (!Page.IsPostBack)
        {
            NewArtic();
            if ((Session["ssModo"] != null))
            {
                Accion(Session["ssModo"].ToString());
                if (Session["ssModo"]=="EDI")
                {
                    LkBNew.CssClass = "label btn-warning";
                    //LkBEdit.CssClass = "label btn-success";
                }
                else
                {
                    LkBNew.CssClass = "label btn-success";
                    //LkBEdit.CssClass = "label btn-warning";
                }
            }
            else
            {
                CargaInicial();
                LkBNew.CssClass = "label btn-success";
                //LkBEdit.CssClass = "label btn-warning";
            }

            get_data_cbo_filtro("CODIGO", "NOMBRE", "", "", "");
            get_data_cbo_filtro2("CODIGO", "NOMBRE", "", "", "");
        }
    }
 public bool Update(string empresaid, tb_cxc_fecha BE)
 {
     return tablaDA.Update(empresaid, BE);
 }
 public DataSet GetAll_paginacion(string empresaid, tb_cxc_fecha BE)
 {
     return tablaDA.GetAll_paginacion(empresaid, BE);
 }
 public bool Insert(string empresaid, tb_cxc_fecha BE)
 {
     return tablaDA.Insert(empresaid, BE);
 }
 public bool Delete(string empresaid, tb_cxc_fecha BE)
 {
     return tablaDA.Delete(empresaid, BE);
 }