/// <summary> /// To Get Componestion by HHId /// </summary> /// <param name="householdID"></param> /// <returns></returns> public CompensationPackagesList GetComponestionbyHHId(int householdID) { proc = "USP_MST_SELCOMPKGAPP"; cnn = new OracleConnection(con); CompensationPackagesBO objCOMPACK = null; CompensationPackagesList COMPACKList = new CompensationPackagesList(); cmd = new OracleCommand(proc, cnn); cmd.CommandType = CommandType.StoredProcedure; // cmd.Parameters.Add("PackageCat_", PackageCat); cmd.Parameters.Add("HHID_", householdID); cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output; try { cmd.Connection.Open(); OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { objCOMPACK = new CompensationPackagesBO(); if (ColumnExists(dr, "PKGDOCITEMID") && !dr.IsDBNull(dr.GetOrdinal("PKGDOCITEMID"))) { objCOMPACK.PKGdocItemID = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("PKGDOCITEMID"))); } if (ColumnExists(dr, "PKGDOCCATEGORYID") && !dr.IsDBNull(dr.GetOrdinal("PKGDOCCATEGORYID"))) { objCOMPACK.ITEMpkgdocitemID = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("PKGDOCCATEGORYID"))); } if (ColumnExists(dr, "PKGDOCITEMNAME") && !dr.IsDBNull(dr.GetOrdinal("PKGDOCITEMNAME"))) { objCOMPACK.PKGDOCitemName = dr.GetString(dr.GetOrdinal("PKGDOCITEMNAME")); } if (ColumnExists(dr, "DOCUMENTCODE") && !dr.IsDBNull(dr.GetOrdinal("DOCUMENTCODE"))) { objCOMPACK.PKGDocumentCode = dr.GetString(dr.GetOrdinal("DOCUMENTCODE")); } COMPACKList.Add(objCOMPACK); } dr.Close(); } catch (Exception ex) { throw ex; } return(COMPACKList); }
public CompensationPackagesList getprintComments(int Hhid) { CompensationPackagesList COMPACKList = new CompensationPackagesList(); OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString); OracleCommand cmd; string proc = "USP_TRN_GET_PRINTPKGCOMMENTS"; cmd = new OracleCommand(proc, cnn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("HHID_", Hhid); cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output; try { cmd.Connection.Open(); OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); CompensationPackagesBO cmppkgBo; while (dr.Read()) { cmppkgBo = new CompensationPackagesBO(); if (!dr.IsDBNull(dr.GetOrdinal("PRINTBY"))) { cmppkgBo.UserName = dr.GetString(dr.GetOrdinal("PRINTBY")); } if (!dr.IsDBNull(dr.GetOrdinal("PRINTUPDATE"))) { cmppkgBo.ApprovedDate = dr.GetValue(dr.GetOrdinal("PRINTUPDATE")).ToString(); } if (!dr.IsDBNull(dr.GetOrdinal("PKGDOCITEMNAME"))) { cmppkgBo.PKGDOCitemName = (dr.GetString(dr.GetOrdinal("PKGDOCITEMNAME"))); } if (!dr.IsDBNull(dr.GetOrdinal("COMMENTS"))) { cmppkgBo.ApprovalComents = dr.GetString(dr.GetOrdinal("COMMENTS")); } COMPACKList.Add(cmppkgBo); } dr.Close(); } catch (Exception ex) { throw ex; } return(COMPACKList); }
/// <summary> /// To get approval Comments /// </summary> /// <param name="objCOMPPACKBO"></param> /// <returns></returns> public CompensationPackagesList getApproverReviewComments(CompensationPackagesBO pCompensationPackagesBO) { proc = "USP_TRN_GET_REV_COMMENTS"; cnn = new OracleConnection(con); CompensationPackagesBO oCompensationPackagesBO = null; CompensationPackagesList oCompensationPackagesList = new CompensationPackagesList(); cmd = new OracleCommand(proc, cnn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("DocumentCode_", pCompensationPackagesBO.DocumentCode); cmd.Parameters.Add("HHID_", pCompensationPackagesBO.HHID); cmd.Parameters.Add("ApprovalLevel_", pCompensationPackagesBO.ApprovalLevel); cmd.Parameters.Add("UserID_", pCompensationPackagesBO.UserID); cmd.Parameters.Add("ProjectID_", pCompensationPackagesBO.ProjectID); cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output; try { cmd.Connection.Open(); OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { oCompensationPackagesBO = new CompensationPackagesBO(); if (!dr.IsDBNull(dr.GetOrdinal("APPROVERCOMMENTS"))) { oCompensationPackagesBO.ApprovalComents = dr.GetString(dr.GetOrdinal("APPROVERCOMMENTS")); } if (!dr.IsDBNull(dr.GetOrdinal("username"))) { oCompensationPackagesBO.UserName = dr.GetString(dr.GetOrdinal("username")); } if (!dr.IsDBNull(dr.GetOrdinal("APPROVAL_LEVEL"))) { oCompensationPackagesBO.ApprovalLevel = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("APPROVAL_LEVEL"))); } if (!dr.IsDBNull(dr.GetOrdinal("REVIEWDATE"))) { oCompensationPackagesBO.ApprovedDate = dr.GetDateTime(dr.GetOrdinal("REVIEWDATE")).ToString(UtilBO.DateFormatFull); } if (!dr.IsDBNull(dr.GetOrdinal("REVIEWDATE"))) { oCompensationPackagesBO.PKGDoccatName = dr.GetString(dr.GetOrdinal("pkgdocitemname")); } oCompensationPackagesList.Add(oCompensationPackagesBO); } dr.Close(); } catch (Exception ex) { throw ex; } return(oCompensationPackagesList); }