private static Personal_qr PersonalQRAdd(IDbTransaction trans, Personal o) { Personal_qr oPQr = new Personal_qr() { Id_personal = o.Id, Idf = o.PQr.Idf }; try { Personal_qrMng oPQrMng = new Personal_qrMng(); oPQrMng.O_Personal_qr = oPQr; oPQrMng.add(trans); Personal_qr_pivoteMng oPQRPivMng = new Personal_qr_pivoteMng(); Personal_qr_pivote oPQRPiv = new Personal_qr_pivote() { Idf = o.PQr.Idf }; oPQRPivMng.O_Personal_qr_pivote = oPQRPiv; oPQRPivMng.dltByIdf(trans); } catch { throw; } return(oPQr); }
public static Personal_qr_pivote PersonalQrPivoteAdd(Personal_qr_pivote o) { try { Personal_qr_pivoteMng oMng = new Personal_qr_pivoteMng() { O_Personal_qr_pivote = o }; oMng.add(); } catch { throw; } return(o); }
private static void PersonalQrPivoteDltByUser(int id_usuario) { try { Personal_qr_pivoteMng oPqrPMng = new Personal_qr_pivoteMng(); Personal_qr_pivote oPQrPiv = new Personal_qr_pivote() { Id_usuario = id_usuario }; oPqrPMng.O_Personal_qr_pivote = oPQrPiv; oPqrPMng.dltByUser(); } catch { throw; } }
public override void fillLst() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Personal_qr_pivote"); addParameters(0); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List <Personal_qr_pivote>(); foreach (DataRow dr in dt.Rows) { Personal_qr_pivote o = new Personal_qr_pivote(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
public static string PersonalQrPivoteGetFolio(int id_usuario) { string folio = string.Empty; try { Personal_qr_pivoteMng oPqrPMng = new Personal_qr_pivoteMng(); Personal_qr_pivote oPQrPiv = new Personal_qr_pivote() { Id_usuario = id_usuario }; oPqrPMng.O_Personal_qr_pivote = oPQrPiv; oPqrPMng.fillLstByIdUsuario(); if (oPqrPMng.Lst.Count > 0) { folio = oPqrPMng.Lst.First().Idf; } } catch { throw; } return(folio); }
protected void BindByDataRow(DataRow dr, Personal_qr_pivote o) { try { int.TryParse(dr["id"].ToString(), out entero); o.Id = entero; entero = 0; o.Idf = dr["idf"].ToString(); if (dr["id_usuario"] != DBNull.Value) { int.TryParse(dr["id_usuario"].ToString(), out entero); o.Id_usuario = entero; entero = 0; } else { o.Id_usuario = null; } } catch { throw; } }
public Personal_qr_pivoteMng() { this._oPersonal_qr_pivote = new Personal_qr_pivote(); this._lst = new List <Personal_qr_pivote>(); }