public List <E_TA_TIPO_EVAL> Reporte() { s_sql_action.Data_Base_Name = s_sql_action.val_BD_PLAN; var cmd = s_sql_action.GetProcedure("PR_TIPO_EVAL_RE01"); ds = new DataSet(); ds = s_sql_action.ExecuteDataSet(cmd); List <E_TA_TIPO_EVAL> list = new List <E_TA_TIPO_EVAL>(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { E_TA_TIPO_EVAL O_TA_TIPO_EVAL = new E_TA_TIPO_EVAL(); O_TA_TIPO_EVAL.FS_TIP_EVAL = ds.Tables[0].Rows[i]["FS_TIP_EVAL"].ToString(); O_TA_TIPO_EVAL.FS_DES_TIPO_EVAL = ds.Tables[0].Rows[i]["FS_DES_TIPO_EVAL"].ToString(); O_TA_TIPO_EVAL.FS_COD_USCR = ds.Tables[0].Rows[i]["FS_COD_USCR"].ToString(); O_TA_TIPO_EVAL.FD_FEC_USCR = Convert.ToDateTime(ds.Tables[0].Rows[i]["FD_FEC_USCR"].ToString()); O_TA_TIPO_EVAL.FS_COD_USMO = ds.Tables[0].Rows[i]["FS_COD_USMO"].ToString(); O_TA_TIPO_EVAL.FD_FEC_USMO = Convert.ToDateTime(ds.Tables[0].Rows[i]["FD_FEC_USMO"].ToString()); list.Add(O_TA_TIPO_EVAL); } return(list); }
public void Eliminar(E_TA_TIPO_EVAL O_TA_TIPO_EVAL) { s_sql_action.Data_Base_Name = s_sql_action.val_BD_PLAN; var cmd = s_sql_action.GetProcedure("PR_TIPO_EVAL_EL01", O_TA_TIPO_EVAL.FS_TIP_EVAL); s_sql_action.ExecuteNonQuery(cmd); }
public void Actualizar(E_TA_TIPO_EVAL O_TA_TIPO_EVAL) { s_sql_action.Data_Base_Name = s_sql_action.val_BD_PLAN; var cmd = s_sql_action.GetProcedure("PR_TIPO_EVAL_AC01", O_TA_TIPO_EVAL.FS_TIP_EVAL, O_TA_TIPO_EVAL.FS_DES_TIPO_EVAL, O_TA_TIPO_EVAL.FS_COD_USMO); s_sql_action.ExecuteNonQuery(cmd); }
public JsonResult validaExistenciaTIP_EVAL(E_TA_TIPO_EVAL obj) { obj = sqlApoyo.Buscar_Por_Codigo(obj.FS_TIP_EVAL); if (obj.FS_TIP_EVAL != "") { return(Json(true)); } else { return(Json("Código no existe")); } }
public JsonResult Actualizar(E_TA_TIPO_EVAL model) { var resp = new ResponseModel { response = true, //redirect="Home/Index", error = "" }; if (ModelState.IsValid) { UpdateTipoEvaluacion(model); } else { resp.response = false; } return(Json(resp)); }
public E_TA_TIPO_EVAL Buscar_Por_Codigo(string P_FS_TIP_EVAL) { E_TA_TIPO_EVAL O_TA_TIPO_EVAL = new E_TA_TIPO_EVAL(); s_sql_action.Data_Base_Name = s_sql_action.val_BD_PLAN; var cmd = s_sql_action.GetProcedure("PR_TIPO_EVAL_BU01", P_FS_TIP_EVAL); ds = new DataSet(); ds = s_sql_action.ExecuteDataSet(cmd); if (ds.Tables[0].Rows.Count == 0) { O_TA_TIPO_EVAL.FS_TIP_EVAL = ""; } else { O_TA_TIPO_EVAL.FS_TIP_EVAL = ds.Tables[0].Rows[0]["FS_TIP_EVAL"].ToString(); O_TA_TIPO_EVAL.FS_DES_TIPO_EVAL = ds.Tables[0].Rows[0]["FS_DES_TIPO_EVAL"].ToString(); O_TA_TIPO_EVAL.FS_COD_USCR = ds.Tables[0].Rows[0]["FS_COD_USCR"].ToString(); O_TA_TIPO_EVAL.FD_FEC_USCR = Convert.ToDateTime(ds.Tables[0].Rows[0]["FD_FEC_USCR"].ToString()); O_TA_TIPO_EVAL.FS_COD_USMO = ds.Tables[0].Rows[0]["FS_COD_USMO"].ToString(); O_TA_TIPO_EVAL.FD_FEC_USMO = Convert.ToDateTime(ds.Tables[0].Rows[0]["FD_FEC_USMO"].ToString()); } return(O_TA_TIPO_EVAL); }
//public ActionResult ReportPerfil() //{ // List<E_TA_TIPO_EVAL> list = new List<E_TA_TIPO_EVAL>(); // list = sql.Reporte(); // string ruta_capa_rep = "\\PYP_Reportes"; // string rptRuta = Path.GetDirectoryName(Path.GetDirectoryName(Server.MapPath(""))) + ruta_capa_rep; // ReportDocument rd = new ReportDocument(); // rd.Load(Path.Combine(rptRuta, "Rpt_Categoria.rpt")); // rd.SetDataSource(list); // Response.Buffer = false; // Response.ClearContent(); // Response.ClearHeaders(); // Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat); // stream.Seek(0, SeekOrigin.Begin); // //Response.AddHeader("Content-Disposition", "inline; filename=Authorization.pdf"); // return File(stream, "application/pdf", "Reporte_Categoria.pdf"); //} public void SaveTipoEvaluacion(E_TA_TIPO_EVAL obj) { obj.FS_COD_USCR = "shinta"; sql.Insertar(obj); }
public ActionResult EditTipoEvaluacion(E_TA_TIPO_EVAL obj) { ViewBag.getTipoEvaluacion = sql.Buscar_Por_Codigo(obj.FS_TIP_EVAL); return(View()); }
public void DeleteTipoEvaluacion(E_TA_TIPO_EVAL obj) { sql.Eliminar(obj); }
public void UpdateTipoEvaluacion(E_TA_TIPO_EVAL obj) { obj.FS_COD_USMO = "shinta"; sql.Actualizar(obj); }