public static void Modificar(Ley ley) { try { var db = BDConn.Connector(); db.Update(ley); /* * if (result > 0) * { * return new Resultado * { * Codigo = 1, * Mensaje = "Ley modificada correctamente" * }; * * } * else * { * return new Resultado * { * Codigo = 99, * Mensaje = "Problemas al modificar ley" * }; * * }*/ } catch (Exception) { throw; } }
public static Ley BuscarLey(int id) { try { var db = BDConn.Connector(); Ley leyBuscada = db.Select <Ley>(x => x.IdLeyAdquirida == id).FirstOrDefault(); if (leyBuscada != null) { leyBuscada.Codigo = 1; leyBuscada.Mensaje = "Ley cargada correctamente"; } else { leyBuscada.Codigo = 99; leyBuscada.Mensaje = "Ley no existe"; } return(leyBuscada); } catch (Exception) { throw; } }
public static void EliminarLey(Ley ley) { try { var db = BDConn.Connector(); db.Delete(ley); /* * if (result > 0) * { * return new Resultado * { * Codigo = 1, * Mensaje = "Ley eliminada correctamente" * }; * * } * else * { * return new Resultado * { * Codigo = 99, * Mensaje = "Problemas al eliminar ley" * }; * * * * }*/ } catch (Exception) { throw; } }
public void ModificarLey() { Ley ley = LeyBLL.BuscarLey(0); ley.LeyAdquirida = "Ley 8800"; LeyBLL.Modificar(ley); }
public static void EliminarLey(Ley ley) { try { LeyDAL.EliminarLey(ley); } catch (Exception) { throw; } }
public static void Modificar(Ley ley) { try { LeyDAL.Modificar(ley); } catch (Exception) { throw; } }
public static ResultadoPorSP AgregarLey(Ley ley) { try { return(LeyDAL.AgregarLey(ley)); } catch (Exception) { throw; } }
public void AgregarLey() { //Creacion del objeto Ley ley = new Ley { LeyAdquirida = "Ley Jairon" }; LeyBLL.AgregarLey(ley); }
private void Calcular_Click(object sender, EventArgs e) { double Aguinaldo, Vacaciones, Prima, Infonavit, Imss, Rcv; double Sgmm, Sgmmd, Vales, Comedor, Seguro, Personal, Sick; double Saldo, Ley, Empresa, Total; Aguinaldo = (Convert.ToDouble(aguinaldo.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Vacaciones = (Convert.ToDouble(vacaciones.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Prima = (Convert.ToDouble(prima.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Infonavit = (Convert.ToDouble(infonavit.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Imss = (Convert.ToDouble(imss.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Rcv = (Convert.ToDouble(rcv.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Sgmm = (Convert.ToDouble(sgmm.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Sgmmd = Sgmm * (Convert.ToDouble(dependents.Text)); Vales = (Convert.ToDouble(vales.Text) * (Convert.ToDouble(saldo1.Text))) / 100; Comedor = Convert.ToDouble(comedor.Text); Seguro = Convert.ToDouble(seguro.Text); Personal = Convert.ToDouble(personal.Text); Sick = Convert.ToDouble(sick.Text); aguinaldo2.Text = Aguinaldo.ToString("C"); vacaciones2.Text = Vacaciones.ToString("C"); prima2.Text = Prima.ToString("C"); infonavit2.Text = Infonavit.ToString("C"); imss2.Text = Imss.ToString("C"); rcv2.Text = Rcv.ToString("C"); sgmm2.Text = Sgmm.ToString("C"); sgmmd2.Text = Sgmmd.ToString("C"); vales2.Text = Vales.ToString("C"); comedor2.Text = Comedor.ToString("C"); seguro2.Text = Seguro.ToString("C"); personal2.Text = Personal.ToString("C"); sick2.Text = Sick.ToString("C"); Saldo = Convert.ToDouble(saldo1.Text); Ley = Aguinaldo + Vacaciones + Prima + Infonavit + Imss + Rcv; Empresa = Sgmm + Sgmmd + Vales + Comedor + Seguro + Personal + Sick;; Total = Saldo + Empresa + Ley; saldo2.Text = Saldo.ToString("C"); ley.Text = Ley.ToString("C"); empresa.Text = Empresa.ToString("C"); total.Text = Total.ToString("C"); }
public static ResultadoPorSP AgregarLey(Ley ley) { try { var db = BDConn.Connector(); ResultadoPorSP resultado = db.SqlList <ResultadoPorSP>(string.Format("EXEC SPInsertarLeyes " + "@LeyAdquirida = '{0}'," + "@Usuario = '{1}' ", ley.LeyAdquirida, "*****@*****.**" )).FirstOrDefault(); return(resultado); } catch (Exception) { throw; } }
public void EliminarLey() { Ley ley = LeyBLL.BuscarLey(0); LeyBLL.EliminarLey(ley); }
public void BuscarLey() { Ley ley = LeyBLL.BuscarLey(0); }
public override string ToString() { return(Copias + "|" + GrupoPrestado.ToString() + "|" + Encargado.ToString() + Ley.ToString()); }