コード例 #1
0
        protected void btn_notaParcial_Click(object sender, EventArgs e)
        {
            EvaluationPlan evaluation = new EvaluationPlan();
            long           personId   = long.Parse(GridView1.SelectedRow.Cells[1].Text);
            long           stuModId   = proxySM.GetStudentModuleId((long)Session["TeachModID"], personId);
            long           evalPlanId = long.Parse(ddl_Evaluacion.SelectedValue);
            float          value      = float.Parse(TextBox1.Text);

            entity     = new Qualifications();
            evaluation = GetPlanEvaluacion(evalPlanId);
            //lbl_Ponderacion.Text = evaluation.Consideration+"";

            try
            {
                entity.Qualification      = value;
                entity.StudentModuleCode  = stuModId;
                entity.EvaluationPlanCode = evalPlanId;

                proxyQ.InsertQualification(entity);
                TextBox1.Text    = "";
                lbl_mensaje.Text = "ÉXITO. La calificación se ha registrado.";
            }
            catch (Exception ex)
            {
                lbl_mensaje.Text = "ERROR. La calificación NO se ha registrado.";
            }
        }
コード例 #2
0
        protected void btn_RegistrarParcial_Click(object sender, EventArgs e)
        {
            ComponentesGráficos3(true);
            ComponentesGraficos1(false);

            string   forma       = ddl_formaEvaluacion.SelectedValue;
            string   modo        = ddl_Modalidad.SelectedValue;
            string   descripcion = txt_Description.Text;
            float    ponderacion = float.Parse(txt_Ponderación.Text);
            DateTime fecha       = Calendar1.SelectedDate;

            try
            {
                entityEP = new EvaluationPlan();

                entityEP.Form           = forma;
                entityEP.Mode           = modo;
                entityEP.Description    = descripcion;
                entityEP.Consideration  = ponderacion;
                entityEP.Date           = fecha;
                entityEP.GlobalPlanCode = (long)Session["GlobalPlanID"];

                proxyEP.InsertEvaluationPlan(entityEP);
                lbl_Mensaje.Text = "ÉXITO. Los datos han sido Registrados.";
                ListaParciales((long)Session["GlobalPlanID"]);
                txt_Description.Text = "";
                txt_Ponderación.Text = "";
                Label10.Visible      = true;
            }
            catch (Exception ex)
            {
                lbl_Mensaje.Text = "ERROR. Los datos NO han sido Registrados.";
            }
        }
コード例 #3
0
 public void InsertEvaluationPlan(EvaluationPlan entity)
 {
     using (var context = new QualificationsDBEntities())
     {
         context.EvaluationPlan.Attach(entity);
         context.ObjectStateManager.ChangeObjectState(entity, System.Data.EntityState.Added);
         context.SaveChanges();
     }
 }
コード例 #4
0
ファイル: Evalutonplan.cs プロジェクト: EslamYousef/Hr-System
        public EvaluationPlan AddOne(EvaluationPlan model)
        {
            try
            {
                var obj = context.EvaluationPlan.Add(model);
                context.SaveChanges();

                //==================================================================================
                return(obj);
            }
            catch (DbUpdateException)
            {
                return(null);
            }
            catch (Exception)
            {
                return(null);
            }
        }
コード例 #5
0
ファイル: Evalutonplan.cs プロジェクト: EslamYousef/Hr-System
        public EvaluationPlan Editone(EvaluationPlan model)
        {
            try
            {
                var record = context.EvaluationPlan.FirstOrDefault(m => m.ID == model.ID);
                record.Description = model.Description;
                record.Year        = model.Year;
                record.Name        = model.Name;
                record.previous_apprisal_to_review = model.previous_apprisal_to_review;

                context.SaveChanges();
                return(record);
            }
            catch (DbUpdateException)
            {
                return(null);
            }
            catch (Exception)
            {
                return(null);
            }
        }