예제 #1
0
        private void FxData()
        {
            ObjDt = null;

            GrdData.DataSource = null;

            GrdData.Enabled = false;

            CmdEdit.Enabled = false;

            ObjDt = ClsSqlCore.Fx_sel_tblCountry(false);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    GrdData.DataSource = ObjDt.DefaultView;

                    GrdData.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

                    GrdData.Columns[0].DefaultCellStyle.WrapMode = DataGridViewTriState.True;

                    GrdData.Columns[3].Visible = false;

                    GrdData.Enabled = true;

                    CmdEdit.Enabled = true;

                    GrdData.Focus();
                }
            }
        }
예제 #2
0
        private void FxData()
        {
            ObjDt = null;

            GrdData.DataSource = null;

            GrdData.Enabled = false;

            CmdEdit.Enabled = false;


            ObjDt = ClsSqlAdministrator.Fx_sel_tblProfile(false);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    GrdData.DataSource = ObjDt.DefaultView;

                    GrdData.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

                    GrdData.Columns[2].Visible = false;

                    GrdData.Enabled = true;

                    GrdData.Enabled = true;

                    CmdEdit.Enabled = true;


                    GrdData.Focus();
                }
            }
        }
예제 #3
0
        // Service.ServiceClient service = new Service.ServiceClient();

        protected void Page_Load(object sender, EventArgs e)
        {
            int idEstudiante = 0;

            string nl = Environment.NewLine; // new line variable

            if (!IsPostBack)
            {
                var round  = Session["round"];
                var idjury = Session["IdJury"];
                var pict   = Session["picture"];
                Label1.Text = "JURADO <br/>" + Session["name"];
                Label2.Text = "Round " + Session["round"];
                Label3.Text = (string)Session["roundDesc"];

                var criteria        = (string)(Session["idCriteria"]);
                var listaEstuRoundR = service.GetRoundResults(Convert.ToInt32(idjury), Convert.ToInt32(round));


                GrdData.DataSource = this.Estudiantes();
                GrdData.DataBind();
                Calificaciones.DataSource = this.Elementos(criteria, Convert.ToInt32(round));
                Calificaciones.DataBind();


                foreach (GridViewRow row in GrdData.Rows)
                {
                    idEstudiante = Convert.ToInt32(GrdData.DataKeys[row.RowIndex].Values[0].ToString());
                    CheckBox Chbox = (CheckBox)row.FindControl("cbSelect");

                    for (int o = 0; o < listaEstuRoundR.Count(); o++)
                    {
                        var idEst = listaEstuRoundR[o].Student.IdStudent.ToString();

                        if (idEstudiante == Convert.ToInt32(idEst))
                        {
                            if (listaEstuRoundR[o].TotalValue > 0)
                            {
                                Chbox.Checked = true;
                                Chbox.Enabled = false;
                            }
                            else
                            {
                                Chbox.Checked = false;
                                Chbox.Enabled = true;
                            }
                        }
                    }
                }
            }
        }
예제 #4
0
        private void FxReset()
        {
            long lUserId;

            try
            {
                lUserId = long.Parse(GrdData.SelectedRows[0].Cells[4].Value.ToString());
            }
            catch
            {
                lUserId = 0;
            }

            if (lUserId == 0)
            {
                ClsFunctions.FxMessage(1, "Seleccione usuario");

                GrdData.Focus();

                return;
            }

            if (ClsFunctions.FxMessage(2, "¿Está seguro de restablecer la constraseña?") == true)
            {
                long lUserId_new = ClsSqlAdministrator.Fx_upt_tblUser_resetPassword(lUserId);

                if (lUserId_new == 0)
                {
                    ClsFunctions.FxMessage(1, "Contraseña no fue restablecida. Intente de nuevo");
                }
                else
                {
                    ClsFunctions.FxMessage("Contraseña fue restablecida satisfactoriamente");

                    FxCancel();
                }
            }
        }
예제 #5
0
        private void FxEdit()
        {
            long lCountryId;

            try
            {
                lCountryId = long.Parse(GrdData.SelectedRows[0].Cells[3].Value.ToString());
            }
            catch
            {
                lCountryId = 0;
            }

            if (lCountryId == 0)
            {
                ClsFunctions.FxMessage(1, "Seleccione país");

                GrdData.Focus();

                return;
            }

            FxFormDetail(lCountryId);
        }
예제 #6
0
        private void FxEdit()
        {
            long lDataTypeId;

            try
            {
                lDataTypeId = long.Parse(GrdData.SelectedRows[0].Cells[2].Value.ToString());
            }
            catch
            {
                lDataTypeId = 0;
            }

            if (lDataTypeId == 0)
            {
                ClsFunctions.FxMessage(1, "Seleccione Tipo de dato");

                GrdData.Focus();

                return;
            }

            FxFormDetail(lDataTypeId);
        }