public static string Cliente_DocumentoLstToJson() { Cliente_documentoMng oMng = new Cliente_documentoMng(); oMng.fillLst(); return(JsonConvert.SerializeObject(oMng.Lst, Formatting.Indented)); }
public static List <Cliente_documento> Cliente_DocumentoFillLstByCliente(int id_cliente) { List <Cliente_documento> lst = new List <Cliente_documento>(); try { Cliente_documentoMng oCDMng = new Cliente_documentoMng(); Cliente_documento oCD = new Cliente_documento(); oCD.Id_cliente = id_cliente; oCDMng.O_Cliente_documento = oCD; oCDMng.fillLstByCliente(); lst = oCDMng.Lst; } catch { throw; } return(lst); }
public static void Cliente_udt(Cliente oC) { IDbTransaction trans = null; try { trans = GenericDataAccess.BeginTransaction(); ClienteMng oCMng = new ClienteMng(); oCMng.O_Cliente = oC; oCMng.udt(trans); Cliente_documentoMng oCDMng = new Cliente_documentoMng(); Cliente_documento oCDDlt = new Cliente_documento(); oCDDlt.Id_cliente = oC.Id; oCDMng.O_Cliente_documento = oCDDlt; oCDMng.dltByCliente(trans); foreach (Cliente_documento oCD in oC.PLstDocReq) { oCD.Id_cliente = oC.Id; oCDMng.O_Cliente_documento = oCD; oCDMng.add(trans); } Cliente_copia_operacionMng oCCOpMng = new Cliente_copia_operacionMng(); oCCOpMng.dltByCliente(oC.Id, trans); foreach (Cliente_copia_operacion oCCOp in oC.PLstCopiaOp) { oCCOp.Id_cliente = oC.Id; oCCOpMng.O_Cliente_copia_operacion = oCCOp; oCCOpMng.add(trans); } GenericDataAccess.CommitTransaction(trans); } catch { if (trans != null) { GenericDataAccess.RollbackTransaction(trans); } throw; } }