Example #1
0
        public void Cargar_EntregaEnc(string OT)
        {
            OrdenController oc = new OrdenController();

            RadGrid3.DataSource = oc.CargarAprobadosPT(OT, 2);
            RadGrid3.DataBind();
        }
        public void CargarDatos()
        {
            Controller_EstadoOT eo = new Controller_EstadoOT();

            lblOT.Text = Request.QueryString["OT"];
            Intranet.ModuloDespacho.Model.Estado_OT et = eo.BuscarOTLiquidar(Request.QueryString["OT"], 1);
            lblNombreOT.Text = et.NombreOT;
            lblCliente.Text  = et.Cliente;
            if (et.FechaMaxima != "")
            {
                lblFechaLiqui.Text = Convert.ToDateTime(et.FechaMaxima).ToString("dd-MM-yyyy");
            }

            Controller_Liquidacion controlliqui = new Controller_Liquidacion();

            RadGrid1.DataSource = controlliqui.ListarHistorialLiquidacion(Request.QueryString["OT"]);
            RadGrid1.DataBind();
            RadGrid3.DataSource = controlliqui.ListarHistorialNotas(Request.QueryString["OT"]);
            RadGrid3.DataBind();
            RadGridfacturacion.DataSource = controlliqui.ListarDetalleFacturacion(Request.QueryString["OT"]);
            RadGridfacturacion.DataBind();

            ddlProblema.DataSource     = controlliqui.ListarDetalle();
            ddlProblema.DataTextField  = "OT";
            ddlProblema.DataValueField = "TotalDesp";
            ddlProblema.DataBind();
            ddlProblema.Items.Insert(0, new ListItem("Seleccionar", "Seleccionar"));
            ddlProblema.Attributes.Add("disabled", "disabled");

            RadGrid2.DataSource = controlliqui.ListarDespachos(Request.QueryString["OT"], 0);
            RadGrid2.DataBind();

            lblTabla.Text = controlliqui.ListaDetalleDespachos(Request.QueryString["OT"], 1);
            //string CSR = de.NombreOT;
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DateTime f = Convert.ToDateTime("1900-01-01");
         RadGrid3.DataSource = cd.CargaInformeDevoluciones("", "", f, f, 0);
         RadGrid3.DataBind();
     }
 }
Example #4
0
        protected void BindModelPortFolioSchemes(int modelPortfolioId)
        {
            DataTable dtModelPortFolioSchemeDetails = dsModelPortFolioSchemeDetails.Tables[0];
            string    expression = "XAMP_ModelPortfolioCode=" + modelPortfolioId;

            dtModelPortFolioSchemeDetails.DefaultView.RowFilter = expression;
            RadGrid3.DataSource = dtModelPortFolioSchemeDetails.DefaultView;
            RadGrid3.DataBind();
        }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtOP.Text != "" || txtNombreOP.Text != "")
            {
                if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
                {
                    DateTime a = Convert.ToDateTime(txtFechaInicio.Text);
                    string   b = a.ToString("MM/dd/yyyy");
                    DateTime c = Convert.ToDateTime(txtFechaTermino.Text);
                    string   d = c.ToString("MM/dd/yyyy");

                    DateTime FI = Convert.ToDateTime(b + " 00:00:00");
                    DateTime FT = Convert.ToDateTime(d + " 23:59:59");

                    RadGrid3.DataSource = Enc.CargarAprobadosPT(txtOP.Text, txtNombreOP.Text, FI, FT, 1);
                    RadGrid3.DataBind();

                    RadGrid1.DataSource = Enc.CargarAprobadosProTerminadosPT(txtOP.Text, txtNombreOP.Text, FI, FT, 1);
                    RadGrid1.DataBind();
                }
                else
                {
                    DateTime fec = Convert.ToDateTime("01-01-1900");

                    RadGrid3.DataSource = Enc.CargarAprobadosPT(txtOP.Text, txtNombreOP.Text, fec, fec, 2);
                    RadGrid3.DataBind();

                    RadGrid1.DataSource = Enc.CargarAprobadosProTerminadosPT(txtOP.Text, txtNombreOP.Text, fec, fec, 2);
                    RadGrid1.DataBind();
                }
            }
            else
            {
                if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
                {
                    DateTime a = Convert.ToDateTime(txtFechaInicio.Text);
                    string   b = a.ToString("MM/dd/yyyy");
                    DateTime c = Convert.ToDateTime(txtFechaTermino.Text);
                    string   d = c.ToString("MM/dd/yyyy");

                    DateTime FI = Convert.ToDateTime(b + " 00:00:00");
                    DateTime FT = Convert.ToDateTime(d + " 23:59:59");

                    RadGrid3.DataSource = Enc.CargarAprobadosPT(txtOP.Text, txtNombreOP.Text, FI, FT, 0);
                    RadGrid3.DataBind();

                    RadGrid1.DataSource = Enc.CargarAprobadosProTerminadosPT(txtOP.Text, txtNombreOP.Text, FI, FT, 0);
                    RadGrid1.DataBind();
                }
                else
                {
                    btnFiltro.Text = "ERROR";
                }
            }
        }
Example #6
0
    protected void RadGrid2_SelectedIndexChanged(object sender, EventArgs e)
    {
        RadGrid3.DataBind();
        int empresa = 0;

        try { empresa = Convert.ToInt32(Session["e"]); }
        catch (Exception)
        {
            Response.Redirect("Default.aspx");
        }
        generaGrafica(lblidCliente.Text, RadGrid2.SelectedValue.ToString(), empresa.ToString());
    }
Example #7
0
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
            {
                //seteo fecha Inicio
                string   FecI = txtFechaInicio.Text;
                string[] str  = FecI.Split('-');
                string   dia  = str[0];
                string   mes  = str[1];
                string   año  = str[2];
                año = año.Substring(0, 4);
                string FI = año + "-" + mes + "-" + dia;
                //fin fecha Inicio

                //seteo Fecha Termino
                string   FecT = txtFechaTermino.Text;
                string[] str2 = FecT.Split('/');
                string   dia2 = str2[0];
                string   mes2 = str2[1];
                string   año2 = str2[2];
                año2 = año2.Substring(0, 4);
                string FT = año2 + "-" + mes2 + "-" + dia2;
                //fin fecha Termino
                lista = controlot.ListarOrdenes(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, FI, FT, Session["Usuario"].ToString(), 2);
                RadGrid1.DataSource = lista;
                RadGrid1.DataBind();

                lista2 = controlot.ListarOrdenes(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, FI, FT, Session["Usuario"].ToString(), 4);
                RadGrid2.DataSource = lista2;
                RadGrid2.DataBind();

                lista3 = controlot.ListarOrdenes(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, FI, FT, Session["Usuario"].ToString(), 6);
                RadGrid3.DataSource = lista3;
                RadGrid3.DataBind();
            }
            else
            {
                lista = controlot.ListarOrdenes(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, "", "", Session["Usuario"].ToString(), 1);
                RadGrid1.DataSource = lista;
                RadGrid1.DataBind();

                lista2 = controlot.ListarOrdenes(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, "", "", Session["Usuario"].ToString(), 3);
                RadGrid2.DataSource = lista2;
                RadGrid2.DataBind();

                lista3 = controlot.ListarOrdenes(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, "", "", Session["Usuario"].ToString(), 5);
                RadGrid3.DataSource = lista3;
                RadGrid3.DataBind();
            }
        }
        public void cargarAprobadas()
        {
            DateTime vaa    = DateTime.Now.AddDays(0);
            string   fecha1 = vaa.ToString("MM-dd-yyyy");
            string   fecha2 = fecha1;
            DateTime FI     = Convert.ToDateTime(fecha1 + " 00:00:00");
            DateTime FT     = Convert.ToDateTime(fecha2 + " 23:59:59");

            RadGrid3.DataSource = Enc.CargarAprobadosPT("", "", FI, FT, 0);
            RadGrid3.DataBind();

            RadGrid1.DataSource = Enc.CargarAprobadosProTerminadosPT("", "", FI, FT, 0);
            RadGrid1.DataBind();
        }
Example #9
0
        public void HienTHiABXC(string jsysid, string jsubid, string UserID, string gsbh)
        {
            DataTable dt = dalProjects.HienThiDanhSachJob(jsysid, jsubid, UserID, gsbh);

            if (dt.Rows.Count > 0)
            {
                RadGrid3.DataSource = dt;
                RadGrid3.DataBind();
            }
            else
            {
                RadGrid3.DataSource = null;
                RadGrid3.DataBind();
            }
        }
Example #10
0
        private void CargarRadGrid2()
        {
            //DataTable dt = new DataTable();
            DataSet dsAccionesModulos = new DataSet();
            //DataTable dtAcciones = new DataTable();
            DataTable dtModulos = new DataTable();
            string    mensaje   = string.Empty;

            dsAccionesModulos = perfiles.ModuloConsultar(ref mensaje);

            if (!mensaje.Equals(string.Empty))
            {
                (this.Master as Principal).AlertError(mensaje);
            }

            //Dividir tablas de consulta
            dtAcciones          = dsAccionesModulos.Tables[0];
            RadGrid3.DataSource = dtAcciones == null ? new DataTable() : dtAcciones;
            RadGrid3.DataBind();

            dtModulos = dsAccionesModulos.Tables[1];

            //Agregar columnas al RadGrid2
            GridCheckBoxColumn boundColumn1;

            foreach (DataRow drAccion in dtAcciones.Rows)
            {
                string sAccion = drAccion["Accion"].ToString();
                if (RadGrid2.MasterTableView.Columns.Contains(sAccion))
                {
                    continue;
                }

                boundColumn1 = new GridCheckBoxColumn();
                RadGrid2.MasterTableView.Columns.Add(boundColumn1);
                boundColumn1.DataField                 = sAccion;
                boundColumn1.ToolTip                   = sAccion;
                boundColumn1.HeaderText                = sAccion;
                boundColumn1.UniqueName                = sAccion.Replace(" ", "");
                boundColumn1.HeaderStyle.Width         = 70;
                boundColumn1.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                boundColumn1.Visible                   = true;
            }

            RadGrid2.DataSource = dtModulos == null ? new DataTable() : dtModulos;
            RadGrid2.DataBind();
            CargarAcciones();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txtFechaInicio.Text  = "01/03/2015";
                txtFechaTermino.Text = "31/03/2015";

                RadGrid1.DataSource = "";
                RadGrid1.DataBind();
                RadGrid2.DataSource = "";
                RadGrid2.DataBind();
                RadGrid3.DataSource = "";
                RadGrid3.DataBind();
                RadGrid4.DataSource = "";
                RadGrid4.DataBind();
            }
        }
Example #12
0
        public void HienThiProjects()
        {
            // string UserID = (string)Session["UserID"];
            string    UserID = "27276";
            string    GSBH   = conty;
            DataTable dt     = dalProjects.QryProjectsTheoUserID(UserID, GSBH);

            if (dt.Rows.Count > 0)
            {
                RadGrid3.DataSource = dt;
                RadGrid3.DataBind();
            }
            else
            {
                RadGrid3.DataSource = null;
                RadGrid3.DataBind();
            }
        }
Example #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string p = Request.QueryString["p"];

            Label1.Text = Request.QueryString["ot"] + " - " + Request.QueryString["nOT"];
            DateTime fec = Convert.ToDateTime("01-01-1900");

            RadGrid3.DataSource = Enc.CargarAprobadosPT(Request.QueryString["ot"], "", fec, fec, 2);
            RadGrid3.DataBind();

            if (p == "1")
            {
                btnImprimir.Visible = false;
                btnCerrar.Visible   = false;
                string popupScript = "<script language='JavaScript'>window.print();</script>";
                Page.RegisterStartupScript("PopupScript", popupScript);
            }
        }
Example #14
0
 protected void btnFiltro_Click1(object sender, EventArgs e)
 {
     if (txtCorreo.Text == "" && txtNombre.Text == "" && txtUsername.Text == "")
     {
         //mensaje error
     }
     else
     {
         RadGrid1.DataSource = cUsu.ListarUsuariosFiltro(1, Session["Nombre"].ToString(), txtUsername.Text, txtNombre.Text, txtCorreo.Text);
         RadGrid1.DataBind();
         //grd2
         RadGrid2.DataSource = cUsu.ListarUsuariosFiltro(2, Session["Nombre"].ToString(), txtUsername.Text, txtNombre.Text, txtCorreo.Text);
         RadGrid2.DataBind();
         //grd3
         RadGrid3.DataSource = cUsu.ListarUsuariosFiltro(3, Session["Nombre"].ToString(), txtUsername.Text, txtNombre.Text, txtCorreo.Text);
         RadGrid3.DataBind();
     }
 }
Example #15
0
        protected void rdNo_CheckedChanged(object sender, EventArgs e)
        {
            //divGrillaGuias.Visible = false;
            lblGuias.Visible = false;

            lblGuias.Visible        = false;
            lblIngreseGuias.Visible = true;

            RadGrid3.Visible        = true;
            RadGrid1.Visible        = false;
            lblCantGuia.Visible     = true;
            lblIngreseGuias.Visible = true;
            txtCantidadGuia.Visible = true;
            txtNroGuia.Visible      = true;
            btnAgregarGuia.Visible  = true;
            lblNroGuia.Visible      = true;

            RadGrid3.DataSource = "";
            RadGrid3.DataBind();
        }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
            {
                string[] str = txtFechaInicio.Text.Split('/');
                DateTime f1  = Convert.ToDateTime(str[1] + "/" + str[0] + "/" + str[2] + " 00:00:00");

                string[] str2 = txtFechaTermino.Text.Split('/');
                DateTime f2   = Convert.ToDateTime(str2[1] + "/" + str2[0] + "/" + str2[2] + " 23:59:59");

                RadGrid3.DataSource = cd.CargaInformeDevoluciones(txtOP.Text, txtNombreOP.Text, f1, f2, 2);
                RadGrid3.DataBind();
            }
            else
            {
                DateTime fec = Convert.ToDateTime("1900-01-01");
                RadGrid3.DataSource = cd.CargaInformeDevoluciones(txtOP.Text, txtNombreOP.Text, fec, fec, 1);
                RadGrid3.DataBind();
            }
        }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
            {
                string[] str  = txtFechaInicio.Text.Split('/');
                DateTime fi   = Convert.ToDateTime(str[1] + "/" + str[0] + "/" + str[2] + " 00:00:00");
                string[] str2 = txtFechaTermino.Text.Split('/');
                DateTime ft   = Convert.ToDateTime(str2[1] + "/" + str2[0] + "/" + str2[2] + " 23:59:59");
                //Web2
                RadGrid1.DataSource = pp.Lista_Resumen_PartesManualesDiario("M2016", fi, ft, 0);
                RadGrid1.DataBind();

                //C150  GOSS
                RadGrid2.DataSource = pp.Lista_Resumen_PartesManualesDiario("C150", fi, ft, 0);
                RadGrid2.DataBind();
                //SHCD cd
                RadGrid3.DataSource = pp.Lista_Resumen_PartesManualesDiario("SHCD", fi, ft, 0);
                RadGrid3.DataBind();
                //SH402 4p
                RadGrid4.DataSource = pp.Lista_Resumen_PartesManualesDiario("SH402", fi, ft, 0);
                RadGrid4.DataBind();
            }
        }
Example #18
0
        protected void btnAgregarGuia_Click(object sender, EventArgs e)
        {
            int coun = 0;

            if (txtNroGuia.Text != "" && txtCantidadGuia.Text != "")
            {
                if (coun == 0)
                {
                    List <Devoluciones> l   = new List <Devoluciones>();
                    Devoluciones        des = new Devoluciones();
                    des.guia          = txtNroGuia.Text;
                    des.sucursal      = "Guia Del Cliente";
                    des.despachado    = txtCantidadGuia.Text;
                    des.FechaDespacho = "";

                    l.Add(des);


                    RadGrid3.Visible    = true;
                    RadGrid3.DataSource = l;
                    RadGrid3.DataBind();

                    coun = coun + 1;
                    //bool rr = des.GuiasCliente(Convert.ToInt32(idDev.Text), txtNroGuia.Text, Convert.ToInt32(txtCantidadGuia.Text), 0);
                    //if (rr == true)
                    //{
                    //    RadGrid3.Visible = true;
                    //    RadGrid3.DataSource = des.ListarGuiasCliente(Convert.ToInt32(idDev.Text), "", 0, 1);
                    //    RadGrid3.DataBind();

                    //    coun = coun + 1;
                    //}
                    btnAgregarGuia.Enabled = false;
                }
            }
        }
 public void cargarModulosAsignados(int idusuario)
 {
     RadGrid3.DataSource = cUsu.ListarModulosUsuario(2, idusuario, Session["CentroCosto"].ToString());
     RadGrid3.DataBind();
 }
Example #20
0
 public void cargarTodos()
 {
     RadGrid3.DataSource = cUsu.ListarUsuarios(6, Session["Nombre"].ToString());
     RadGrid3.DataBind();
 }
Example #21
0
 public void cargarLeidos()
 {
     lista3 = controlot.ListarOrdenes("", "", "", null, null, Session["Usuario"].ToString(), 5);
     RadGrid3.DataSource = lista3;
     RadGrid3.DataBind();
 }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
            {
                if (ddlSeccion.SelectedValue.ToString() != "Seleccione...")
                {
                    string[] str  = txtFechaInicio.Text.Split('/');
                    DateTime fi   = Convert.ToDateTime(str[1] + "/" + str[0] + "/" + str[2] + " 00:00:00");
                    string[] str2 = txtFechaTermino.Text.Split('/');
                    DateTime ft   = Convert.ToDateTime(str2[1] + "/" + str2[0] + "/" + str2[2] + " 23:59:59");
                    try
                    {
                        RadGrid2.DataSource = inf.ListaInformeMaquina("", "", fi, ft, 0);
                        RadGrid2.DataBind();
                    }
                    catch
                    {
                    }
                    try
                    {
                        RadGrid1.DataSource = inf.ListaInformeMaquinaPorTurno("", "", fi, ft, 3);
                        RadGrid1.DataBind();
                    }
                    catch
                    {
                    }
                    try
                    {
                        RadGrid3.DataSource = inf.ListaInformeMaquinaAcumuladoMes("", "", fi, ft, 5);
                        RadGrid3.DataBind();
                    }
                    catch
                    {
                    }
                    try
                    {
                        RadGrid4.DataSource = inf.ListaInformeMaquinaAcumuladoMes("", "", fi, ft, 6);
                        RadGrid4.DataBind();
                    }
                    catch
                    {
                    }
                    #region MES
                    string Mes = "";
                    switch (fi.Month)
                    {
                    case 1:
                        Mes = "Enero";
                        break;

                    case 2:
                        Mes = "Febrero";
                        break;

                    case 3:
                        Mes = "Marzo";
                        break;

                    case 4:
                        Mes = "Abril";
                        break;

                    case 5:
                        Mes = "Mayo";
                        break;

                    case 6:
                        Mes = "Junio";
                        break;

                    case 7:
                        Mes = "Julio";
                        break;

                    case 8:
                        Mes = "Agosto";
                        break;

                    case 9:
                        Mes = "Septiembre";
                        break;

                    case 10:
                        Mes = "Octubre";
                        break;

                    case 11:
                        Mes = "Noviembre";
                        break;

                    case 12:
                        Mes = "Diciembre";
                        break;
                    }
                    #endregion

                    lblMes.Text = Mes;
                    lblAño.Text = fi.Year.ToString();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string ot  = Request.QueryString["ot"];
            int    pli = cf.PliegosProcesos2(ot, "", fe, fe, 16);

            if (pli == 0)
            {
                btnActualizar.Enabled = false;
                btnPrefactura.Enabled = false;
            }
            lista = cf.ValorizacionProcesos(ot, pli);
            FacturacionEnc fac = cf.BuscaOT(ot);

            lblOT.Text = "OT: " + fac.OT + "  -  " + fac.NombreOT;
            lblTirajeyDespachado.Text = "Tiraje: " + Convert.ToInt32(fac.Tiraje).ToString("N0").Replace(",", ".") + "  - Cant. Despachada: " + Convert.ToInt32(fac.DespachadoEnc).ToString("N0").Replace(",", ".");
            lblPliegos.Text           = "Nro de Pliegos: " + pli;



            if (!IsPostBack)
            {
                //si existe una prefactura parcial!!
                if (cf.verificarPreFactura(ot, "", fe, fe, 9))
                {
                    gv1.DataSource = cf.FacturacionParcial(ot, "", fe, fe, 10);
                    gv1.DataBind();

                    //deshabilitar las cantidades completadas
                    for (int i = 0; i <= gv1.Rows.Count - 1; i++)
                    {
                        if (gv1.Rows[i].Cells[7].Text == "0")
                        {
                            TextBox txtName = ((TextBox)gv1.Rows[i].FindControl("txtEjemplar"));
                            txtName.Enabled = false;

                            TextBox txtName2 = ((TextBox)gv1.Rows[i].FindControl("txtCantidad"));
                            txtName2.Enabled = false;
                        }
                    }
                }
                else
                {
                    gv1.DataSource = cf.ValorizacionProcesos(ot, pli).OrderBy(o => o.Fecha).Where(p => p.ValorUnitario != "0").Where(p => p.Cantidad != "0");
                    gv1.DataBind();
                }



                DateTime f = Convert.ToDateTime("1900-01-01");
                RadGrid4.DataSource = cf.DespachoEncuadernacion(ot, "", f, f, 1);
                RadGrid4.DataBind();



                int total = 0;
                for (int i = 0; i <= gv1.Rows.Count - 1; i++)
                {
                    total = total + Convert.ToInt32(gv1.Rows[i].Cells[7].Text.Replace(".", "").Replace("$", "").Trim());
                }
                lblTotal.Text = "$   " + total.ToString("N0").Replace(",", ".");



                RadGrid3.DataSource = cf.ListaPrefacturas(ot);
                RadGrid3.DataBind();
            }
        }
        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "UserInfo")
            {
                InfoMeeting.Visible      = false;
                InfoUser.Visible         = true;
                InfoClassDayTime.Visible = false;
                InfoRejectReason.Visible = false;

                string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
                Session["Id"]   = commandArgs[0];
                Session["Name"] = commandArgs[1];

                DataTable DT       = MPB.Get_Customers_Users_InCustomerClass_ByClassId(int.Parse(Session["Id"].ToString()));
                DataTable DTSource = new DataTable();

                DTSource.Columns.Add("ClassName", typeof(string));
                DTSource.Columns.Add("Name", typeof(string));
                DTSource.Columns.Add("Family", typeof(string));
                DTSource.Columns.Add("UserName", typeof(string));
                //DTSource.Columns.Add("Password", typeof(string));
                for (int i = 0; i < DT.Rows.Count; i++)
                {
                    DataRow row = DTSource.NewRow();
                    row["ClassName"] = Session["Name"].ToString();
                    row["Name"]      = DT.Rows[i]["Name"].ToString();
                    row["Family"]    = DT.Rows[i]["Family"].ToString();
                    row["UserName"]  = "******" + DT.Rows[i]["Id"].ToString();

                    //string Ncode = DT.Rows[i]["NationalCode"].ToString();
                    //if (Ncode == "" || Ncode.Length < 8)
                    //    row["Password"] = DT.Rows[i]["UserPass"].ToString();
                    //else
                    //    row["Password"] = DT.Rows[i]["NationalCode"].ToString();

                    DTSource.Rows.Add(row);
                }

                RadGrid3.DataSource = DTSource;
                RadGrid3.DataBind();
            }

            if (e.CommandName == "MeetingInfo")
            {
                InfoMeeting.Visible      = true;
                InfoUser.Visible         = false;
                InfoClassDayTime.Visible = false;
                InfoRejectReason.Visible = false;

                string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
                Session["Id"]   = commandArgs[0];
                Session["Name"] = commandArgs[1];

                DataTable DT       = MPB.Get_Customers_Meeting_ByClassId(int.Parse(Session["Id"].ToString()));
                DataTable DTSource = new DataTable();
                DTSource.Columns.Add("ClassName", typeof(string));
                DTSource.Columns.Add("MeetingLink", typeof(string));

                for (int i = 0; i < DT.Rows.Count; i++)
                {
                    DataRow row = DTSource.NewRow();
                    row["ClassName"] = Session["Name"].ToString();
                    //row["MeetingLink"] = "~/kadobe.iauec.ac.ir"+"/Meeting" + DT.Rows[i]["Id"].ToString();
                    row["MeetingLink"] = "http://kadobe.iauec.ac.ir/Meeting" + DT.Rows[i]["Id"].ToString();
                    DTSource.Rows.Add(row);
                }

                RadGrid2.DataSource = DTSource;
                RadGrid2.DataBind();
            }
            if (e.CommandName == "ClassDayTimeInfo")
            {
                InfoMeeting.Visible      = false;
                InfoUser.Visible         = false;
                InfoClassDayTime.Visible = true;
                InfoRejectReason.Visible = false;

                string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
                Session["Id"]   = commandArgs[0];
                Session["Name"] = commandArgs[1];

                DataTable DT       = MPB.Get_Customers_ClassDayTime_ByClassId(int.Parse(Session["Id"].ToString()));
                DataTable DTSource = new DataTable();
                DTSource.Columns.Add("ClassName", typeof(string));
                DTSource.Columns.Add("DayName", typeof(string));
                DTSource.Columns.Add("BEGIN_HOUR", typeof(string));
                DTSource.Columns.Add("END_HOUR", typeof(string));

                for (int i = 0; i < DT.Rows.Count; i++)
                {
                    DataRow row = DTSource.NewRow();
                    row["ClassName"]  = Session["Name"].ToString();
                    row["DayName"]    = DT.Rows[i]["DayName"].ToString();
                    row["BEGIN_HOUR"] = DT.Rows[i]["BEGIN_HOUR"].ToString();
                    row["END_HOUR"]   = DT.Rows[i]["END_HOUR"].ToString();
                    DTSource.Rows.Add(row);
                }

                RadGrid4.DataSource = DTSource;
                RadGrid4.DataBind();
            }
            if (e.CommandName == "RejectReason")
            {
                InfoMeeting.Visible      = false;
                InfoUser.Visible         = false;
                InfoClassDayTime.Visible = false;
                InfoRejectReason.Visible = true;
                string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
                Session["Id"]   = commandArgs[0];
                Session["Name"] = commandArgs[1];
                lbl_InfoRejectReason_ClassName.Text = "کلاس: " + Session["Name"].ToString() + " به دلایل زیر رد شده است";
                DataTable DTx = MPB.Get_Customers_ClassName_RejectReason(int.Parse(Session["Id"].ToString()));
                txt_Detail.Text = DTx.Rows[0]["Text"].ToString();
            }
        }
        protected void Submit_OnClick(object sender, EventArgs e)
        {
            //fromdate = DateTime.Parse(txtFromDate.SelectedDate.ToString());

            if (ddlAssetGroupName1.SelectedValue == "WL")
            {
                DataSet ds = onlineOrderBackOfficeBo.GetWLNotificationMessageDetails(DropDownList3.SelectedValue, Convert.ToDateTime(txtFromDate.SelectedDate), Convert.ToDateTime(txtToDate.SelectedDate), adviserVo.advisorId);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (Cache["WLMessageDetails" + userVo.UserId.ToString()] == null)
                    {
                        Cache.Insert("WLMessageDetails" + userVo.UserId.ToString(), ds.Tables[0]);
                    }
                    else
                    {
                        Cache.Remove("WLMessageDetails" + userVo.UserId.ToString());
                        Cache.Insert("WLMessageDetails" + userVo.UserId.ToString(), ds.Tables[0]);
                    }
                    pnlWelcomeLetter.Visible   = true;
                    Panel1.Visible             = false;
                    trNoRcrdFound.Visible      = false;
                    rgWelcomeLetter.DataSource = ds;
                    rgWelcomeLetter.DataBind();
                }
                else
                {
                    trNoRcrdFound.Visible    = true;
                    pnlWelcomeLetter.Visible = false;
                    Panel1.Visible           = false;
                }
            }

            //fromdate = DateTime.Parse(txtFromDate.SelectedDate.ToString());
            else
            {
                DataSet ds = onlineOrderBackOfficeBo.GetNotificationMessageDetails(Convert.ToInt32(DropDownList2.SelectedValue), DropDownList3.SelectedValue, Convert.ToDateTime(txtFromDate.SelectedDate), Convert.ToDateTime(txtToDate.SelectedDate));
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (Cache["MessageDetails" + userVo.UserId.ToString()] == null)
                    {
                        Cache.Insert("MessageDetails" + userVo.UserId.ToString(), ds.Tables[0]);
                    }
                    else
                    {
                        Cache.Remove("MessageDetails" + userVo.UserId.ToString());
                        Cache.Insert("MessageDetails" + userVo.UserId.ToString(), ds.Tables[0]);
                    }
                    Panel1.Visible        = true;
                    trNoRcrdFound.Visible = false;

                    pnlWelcomeLetter.Visible = false;
                    RadGrid3.DataSource      = ds;
                    RadGrid3.DataBind();
                }
                else
                {
                    trNoRcrdFound.Visible = true;

                    Panel1.Visible           = false;
                    pnlWelcomeLetter.Visible = false;
                }
            }
        }