Ejemplo n.º 1
0
        /// <summary>
        /// To get pre Comments
        /// </summary>
        /// <param name="cmppkgBo"></param>
        /// <returns></returns>
        public CompensationPackagesBO getpreComments(CompensationPackagesBO cmppkgBo)
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;

            string proc = "USP_TRN_GETPRINTCOUNT";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("DocumentCode_", cmppkgBo.DocumentCode);
            cmd.Parameters.Add("HHID_", cmppkgBo.HHID);
            cmd.Parameters.Add("UserID_", cmppkgBo.UserID);
            cmd.Parameters.Add("ProjectID_", cmppkgBo.ProjectID);
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;

            cmd.Connection.Open();
            OracleDataReader         dr          = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            CompensationPackagesBO   objCMPPACK  = null;
            CompensationPackagesList COMPACKList = new CompensationPackagesList();

            while (dr.Read())
            {
                objCMPPACK = new CompensationPackagesBO();

                if (!dr.IsDBNull(dr.GetOrdinal("TOTALPRINT")))
                {
                    objCMPPACK.PKGdocCount = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("TOTALPRINT")));
                }
            }

            dr.Close();

            return(objCMPPACK);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// To Save reprint Comments
        /// </summary>
        /// <param name="cmppkgBo"></param>
        /// <returns></returns>
        public int SavereprintComments(CompensationPackagesBO cmppkgBo)
        {
            int returnResult;
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);

            cnn.Open();
            OracleCommand dcmd = new OracleCommand("USP_TRN_INS_PKGPRINTDOC", cnn);

            dcmd.CommandType = CommandType.StoredProcedure;
            int count = Convert.ToInt32(dcmd.CommandType);

            try
            {
                dcmd.Parameters.Add("HHID_", cmppkgBo.HHID);
                dcmd.Parameters.Add("DOCUMENTCODE", cmppkgBo.DocumentCode);
                dcmd.Parameters.Add("REVIEWEDBY_", cmppkgBo.UserID);
                dcmd.Parameters.Add("APPROVERCOMMENTS_", cmppkgBo.ApprovalComents);
                dcmd.Parameters.Add("PROJECTID", cmppkgBo.ProjectID);
                dcmd.Parameters.Add("errorMessage_", OracleDbType.Varchar2, 500).Direction = ParameterDirection.Output;
                returnResult = dcmd.ExecuteNonQuery();
            }
            catch
            {
                throw;
            }
            finally
            {
                dcmd.Dispose();
                cnn.Close();
                cnn.Dispose();
            }
            return(returnResult);
        }
Ejemplo n.º 3
0
        public CompensationPackagesList getApproverComments()
        {
            CompensationPackagesBLL  oCompensationPackagesBLL  = new CompensationPackagesBLL();
            CompensationPackagesBO   oCompensationPackagesBO   = new CompensationPackagesBO();
            CompensationPackagesList oCompensationPackagesList = new CompensationPackagesList();

            int projectID = 0;
            int HHID      = 0;

            if (ViewState["PROJECT_ID"] != null)
            {
                projectID = Convert.ToInt32(ViewState["PROJECT_ID"]);
            }

            if (ViewState["HHID"] != null)
            {
                HHID = Convert.ToInt32(ViewState["HHID"]);
            }

            oCompensationPackagesBO.HHID      = HHID;
            oCompensationPackagesBO.ProjectID = projectID;

            oCompensationPackagesList = oCompensationPackagesBLL.getApproverReviewComments(oCompensationPackagesBO);

            return(oCompensationPackagesList);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// To Update Approval Status
        /// </summary>
        /// <param name="objCompensationPackagesBO"></param>
        /// <returns></returns>
        public int UpdateApprovalStatus(CompensationPackagesBO objCompensationPackagesBO)
        {
            int returnResult;
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);

            cnn.Open();
            OracleCommand dcmd = new OracleCommand("USP_TRN_UPD_GRIEAPPROVAL", cnn);

            dcmd.CommandType = CommandType.StoredProcedure;
            int count = Convert.ToInt32(dcmd.CommandType);

            try
            {
                dcmd.Parameters.Add("HHID_", objCompensationPackagesBO.HHID);
                dcmd.Parameters.Add("DocumentCode_", objCompensationPackagesBO.DocumentCode);

                returnResult = dcmd.ExecuteNonQuery();
            }
            catch
            {
                throw;
            }
            finally
            {
                dcmd.Dispose();
                cnn.Close();
                cnn.Dispose();
            }
            return(returnResult);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// To get approval Comments
        /// </summary>
        /// <param name="objCOMPPACKBO"></param>
        /// <returns></returns>
        public CompensationPackagesBO getapprovalComments(CompensationPackagesBO objCOMPPACKBO)
        {
            proc = "USP_TRN_GET_PKGAPPCOMMENTS";
            cnn  = new OracleConnection(con);
            CompensationPackagesBO objCOMPACK = null;

            CompensationPackagesList COMPACKList = new CompensationPackagesList();

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add("DocumentCode_", objCOMPPACKBO.DocumentCode);
            cmd.Parameters.Add("HHID_", objCOMPPACKBO.HHID);
            cmd.Parameters.Add("ApprovalLevel_", objCOMPPACKBO.ApprovalLevel);
            cmd.Parameters.Add("UserID_", objCOMPPACKBO.UserID);
            cmd.Parameters.Add("ProjectID_", objCOMPPACKBO.ProjectID);

            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 (!dr.IsDBNull(dr.GetOrdinal("APPROVERCOMMENTS")))
                    {
                        objCOMPACK.ApprovalComents = dr.GetString(dr.GetOrdinal("APPROVERCOMMENTS"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("username")))
                    {
                        objCOMPACK.UserName = dr.GetString(dr.GetOrdinal("username"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("APPROVAL_LEVEL")))
                    {
                        objCOMPACK.ApprovalLevel = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("APPROVAL_LEVEL")));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("REVIEWDATE")))
                    {
                        objCOMPACK.ApprovedDate = dr.GetDateTime(dr.GetOrdinal("REVIEWDATE")).ToString(UtilBO.DateFormatFull);
                    }
                    //COMPACKList.Add(objCOMPACK);
                }

                dr.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(objCOMPACK);
        }
Ejemplo n.º 6
0
        /// <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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        public CompensationPackagesList getApproverComments()
        {
            PAP_HouseholdBLL         objOptionGroupCommentsBLL = new PAP_HouseholdBLL();
            CompensationPackagesBO   oCompensationPackagesBO   = new CompensationPackagesBO();
            CompensationPackagesList oCompensationPackagesList = new CompensationPackagesList();

            int HHID = 0;

            if (Session["HH_ID"] != null)
            {
                HHID = Convert.ToInt32(Session["HH_ID"]);
            }

            oCompensationPackagesBO.HHID = HHID;

            oCompensationPackagesList = objOptionGroupCommentsBLL.getprintComments(HHID);

            return(oCompensationPackagesList);
        }
Ejemplo n.º 9
0
 /// <summary>
 /// To get pre Comments
 /// </summary>
 /// <param name="cmppkgBo"></param>
 /// <returns></returns>
 public CompensationPackagesBO getpreComments(CompensationPackagesBO cmppkgBo)
 {
     objCOMPACKDAL = new CompensationPackagesDAL();
     return(objCOMPACKDAL.getpreComments(cmppkgBo));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// To get approval Comments
 /// </summary>
 /// <param name="objCOMPPACKBO"></param>
 /// <returns></returns>
 public CompensationPackagesBO getapprovalComments(CompensationPackagesBO objCOMPPACKBO)
 {
     objCOMPACKDAL = new CompensationPackagesDAL();
     return(objCOMPACKDAL.getapprovalComments(objCOMPPACKBO));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// To get approval Comments
 /// </summary>
 /// <param name="objCOMPPACKBO"></param>
 /// <returns></returns>
 public CompensationPackagesList getApproverReviewComments(CompensationPackagesBO pCompensationPackagesBO)
 {
     objCOMPACKDAL = new CompensationPackagesDAL();
     return(objCOMPACKDAL.getApproverReviewComments(pCompensationPackagesBO));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// To Save Approval Comments
 /// </summary>
 /// <param name="objCOMPPACKBO"></param>
 /// <returns></returns>
 public int SaveApprovalComments(CompensationPackagesBO objCOMPPACKBO)
 {
     objCOMPACKDAL = new CompensationPackagesDAL();
     return(objCOMPACKDAL.SaveApprovalComments(objCOMPPACKBO));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// To Update Approval Status
 /// </summary>
 /// <param name="objCompensationPackagesBO"></param>
 /// <returns></returns>
 public int UpdateApprovalStatus(CompensationPackagesBO objCompensationPackagesBO)
 {
     objCOMPACKDAL = new CompensationPackagesDAL();
     return(objCOMPACKDAL.UpdateApprovalStatus(objCompensationPackagesBO));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// To Save reprint Comments
 /// </summary>
 /// <param name="cmppkgBo"></param>
 /// <returns></returns>
 public int SavereprintComments(CompensationPackagesBO cmppkgBo)
 {
     objCOMPACKDAL = new CompensationPackagesDAL();
     return(objCOMPACKDAL.SavereprintComments(cmppkgBo));
 }