internal string[] GetAdmissionElgibilityConfigStatusofCourse(Hashtable oHs)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;

            string[] sRes = new string[2];

            int iRows = 0;

            try
            {
                oPool   = DBObjectPool.Instance;
                oDB     = oPool.AcquireDBObject();
                oCmd    = oDB.GenerateCommand("Elgv2_GetAdmissionElgibilityConfigStatusofCourse", oHs);
                iRows   = oCmd.ExecuteNonQuery();
                sRes[0] = oCmd.Parameters["@StatusElgConfig"].Value.ToString();
                sRes[1] = oCmd.Parameters["@StatusElgConfigIndepedent"].Value.ToString();
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(sRes);
        }
Ejemplo n.º 2
0
        //Added to check is cancel admission is allowd at DU Side or not

        public bool Allow_CancelAdmissionAtOASide(Hashtable oHt)
        {
            bool       bAllow      = false;
            string     sReturnData = "N";
            SqlCommand cmd         = new SqlCommand();

            oHt.Add("ReturnVal", ParameterDirection.Output);
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                //oDB.ThisConnectionFor = DBConnection.DURead;

                cmd = oDB.GenerateCommand("DU_Configuration_Allow_OA_Cancel", oHt);
                cmd.ExecuteNonQuery();
                sReturnData = cmd.Parameters["@ReturnVal"].Value.ToString();
                if (sReturnData == "Y")
                {
                    bAllow = true;
                }
                else
                {
                    bAllow = false;
                }
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }

            return(bAllow);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This function is to check whether the Eligibility Form Number given , exists in the IA table.
        /// </summary>
        /// <param name="pk_Uni_ID"></param>
        /// <param name="pk_Year"></param>
        /// <param name="pk_Institute_ID"></param>
        /// <param name="pk_Student_ID"></param>
        /// <returns>0 if No Matching Record , 1 if there exists a matching record</returns>
        public static int Check_IA_Student_Exists(string pk_Uni_ID, string pk_Year, string pk_Institute_ID, string pk_Student_ID)
        {
            int          Flag = 0;
            Hashtable    ht   = new Hashtable();
            SqlCommand   cmd  = new SqlCommand();
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                ht.Add("pk_Uni_ID", pk_Uni_ID);
                ht.Add("pk_Year", pk_Year);
                ht.Add("pk_Institute_ID", pk_Institute_ID);
                ht.Add("pk_Student_ID", pk_Student_ID);
                ht.Add("ExistsFlag", Flag);
                cmd = oDB.GenerateCommand("elg_Check_IA_Student_Exists", ht);
                cmd.Parameters["@ExistsFlag"].Direction = ParameterDirection.Output;
                cmd.ExecuteNonQuery();
                Flag = Convert.ToInt32(cmd.Parameters["@ExistsFlag"].Value.ToString());
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
                throw(e);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(Flag);
        }
        internal string[] SaveAdmissionElgConfigurationsForCourse(Hashtable oHs)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;

            string[] sRes = new string[3];

            int iRows = 0;

            try
            {
                oPool = DBObjectPool.Instance;
                oDB   = oPool.AcquireDBObject();

                oCmd    = oDB.GenerateCommand("ELGV2_SaveAdmissionElgConfigurationsForCourse", oHs);
                iRows   = oCmd.ExecuteNonQuery();
                sRes[0] = oCmd.Parameters["@Status"].Value.ToString();
                sRes[1] = oCmd.Parameters["@PartorTermStatus"].Value.ToString();
                sRes[2] = oCmd.Parameters["@ConfiguredPartOrTerm"].Value.ToString();
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(sRes);
        }
Ejemplo n.º 5
0
        public static string SendExamFormModifyRequest_PaperExemptionApproval(Hashtable ht)
        {
            DataTable    dt         = new DataTable();
            DBObjectPool Pool       = null;
            DBObject     oDB        = null;
            string       StatusFlag = "S";

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                SqlCommand cmd = new SqlCommand();
                cmd = oDB.GenerateCommand("ELGV2_PaperExemptionApproval_AddExamFormModifyRequest", ht);
                cmd.ExecuteNonQuery();
                StatusFlag = cmd.Parameters["@StatusFlag"].Value.ToString();
                cmd.Dispose();
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
                StatusFlag = "U";
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(StatusFlag);
        }
Ejemplo n.º 6
0
        public bool SavePRNImportSourceTableEntry(Hashtable oHs)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;
            bool         flag = false;

            int iRows = 0;

            try
            {
                oPool = DBObjectPool.Instance;
                oDB   = oPool.AcquireDBObject();
                oCmd  = oDB.GenerateCommand("ELGV2_PRN_Import_SourceTable_Entry", oHs);

                iRows = oCmd.ExecuteNonQuery();
                if (iRows > 0)
                {
                    flag = true;
                }
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(flag);
        }
        public string modify(Hashtable HtAllValues)
        {
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                SqlCommand cmd = oDB.GenerateCommand("ID_Modify_InstituteType", HtAllValues);                //Change Procedure name
                cmd.ExecuteNonQuery();
                cmd.Dispose();
                cmd.Connection.Close();
                cmd = null;
                Load();
                return("Y");
            }
            catch (Exception ex)
            {
                Exception e;
                e = new Exception(ex.Message, ex);
                return("");
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
        }
        public int delete()
        {
            int          recAffected = 0;
            SqlCommand   cmd;
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                Hashtable objHS = new Hashtable();
                objHS["pk_InstTy_ID"] = PK_InstTy_ID;

                cmd         = oDB.GenerateCommand("ID_Delete_InstituteType", objHS);        //Change Procedure Name
                recAffected = cmd.ExecuteNonQuery();
                Reset();
                cmd.Connection.Close();
                cmd.Dispose();
                cmd = null;
                return(recAffected);
            }
            catch (SqlException ex)
            {
                Exception e;
                e = new Exception(ex.Message, ex);
                throw(e);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
        }
Ejemplo n.º 9
0
        public string Cancelrecords(string AcademicYearID, string tablename)
        {
            string       result;
            DBObjectPool Pool  = null;
            DBObject     oDB   = null;
            Hashtable    objHT = new Hashtable();

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();

                objHT.Add("AcademicYearID", AcademicYearID);
                objHT.Add("SourceTableName", tablename);
                SqlCommand cmd = oDB.GenerateCommand("ELGV2_ImportPRNFromExcel_DeleteTable", objHT);
                int        res = cmd.ExecuteNonQuery();
                result = "Successful";
            }
            catch (Exception ex)
            {
                result = ex.Message;
                return(null);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(result);
        }
        public static string add(Hashtable HtAllValues)
        {
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                string     returnValue;
                SqlCommand cmd = oDB.GenerateCommand("ID_Add_Institutetype", HtAllValues);
                cmd.ExecuteNonQuery();
                returnValue = cmd.Parameters["@pk_InstTy_ID"].Value.ToString();
                cmd.Dispose();
                cmd.Connection.Close();
                cmd = null;

                return(returnValue);
            }
            catch (SqlException ex)
            {
                Exception e;
                e = new Exception(ex.Message, ex);
                return("Y");
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
        }
        internal string[] IsPreviousConfigurationExists(Hashtable oHs)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;

            string[] sRes = new string[7];

            int iRows = 0;

            try
            {
                oPool   = DBObjectPool.Instance;
                oDB     = oPool.AcquireDBObject();
                oCmd    = oDB.GenerateCommand("ELGV2_IsPreviousConfigurationExists", oHs);
                iRows   = oCmd.ExecuteNonQuery();
                sRes[0] = oCmd.Parameters["@isPreviousCoursePartConfigured"].Value.ToString();
                sRes[1] = oCmd.Parameters["@isNextCoursePartConfigured"].Value.ToString();
                sRes[2] = oCmd.Parameters["@PriviousCourse"].Value.ToString();
                sRes[3] = oCmd.Parameters["@NextCourse"].Value.ToString();
                sRes[4] = oCmd.Parameters["@PriviousCourseForDisplay"].Value.ToString();
                sRes[5] = oCmd.Parameters["@OtherPartOrTermExists"].Value.ToString();
                sRes[6] = oCmd.Parameters["@OtherPartOrTermExistsName"].Value.ToString();
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(sRes);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Insert Students Course Part wise Selected Papers
        /// </summary>
        /// <param name="oHt">Hashtable</param>
        /// <returns>Datatable</returns>
        public static string AddStudentAdditionalPapers(Hashtable oHt)
        {
            string       flag;
            SqlCommand   cmd;
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                oHt.Add("Status_Out", ParameterDirection.Output);
                cmd = oDB.GenerateCommand("ELGV2_Add_StudentAdditionalPapers", oHt);
                cmd.ExecuteNonQuery();
                flag = cmd.Parameters["@Result_Out"].Value.ToString();
            }
            catch (Exception ppEx)
            {
                flag = ppEx.Message;
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(flag);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Get Paper Name
        /// </summary>
        /// <param name="oHt">Hashtable</param>
        /// <returns>String</returns>
        public string GetPaperName(string sPpID)
        {
            string    sPaperName = string.Empty;
            DataTable dt         = new DataTable();
            Hashtable oHt        = new Hashtable();

            oHt.Add("PpIDList", sPpID);
            System.Xml.XmlReader      oR = null;
            System.Text.StringBuilder oS = new System.Text.StringBuilder();
            DBObjectPool Pool            = null;

            Pool = DBObjectPool.Instance;
            DBObject oDB = Pool.AcquireDBObject();

            try
            {
                System.Data.SqlClient.SqlCommand cmd = oDB.GenerateCommand("ELGV2_Get_PpName", oHt);
                oR = cmd.ExecuteXmlReader();
                while (!oR.EOF)
                {
                    if (oR.IsStartElement())
                    {
                        oS.Append(oR.ReadOuterXml());
                        oS.Append(Environment.NewLine);
                    }
                }
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(oS.ToString());
        }
Ejemplo n.º 14
0
        public static string SaveChangedPapers(Hashtable ht)
        {
            string       StatusFlag = "S";
            DBObjectPool Pool       = null;
            DBObject     oDB        = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                SqlCommand cmd = new SqlCommand();
                cmd = oDB.GenerateCommand("ELGV2_PaperChange_SaveChangedPapers", ht);
                cmd.ExecuteNonQuery();
                StatusFlag = cmd.Parameters["@StatusFlag"].Value.ToString();

                cmd.Dispose();
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
                StatusFlag = "U";
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(StatusFlag);
        }
Ejemplo n.º 15
0
        //---------------------------------------------------------------------------------------------------

        // Method to Add Exam Form Modify Request for multiple students
        public static string SendExamFormModifyRequest_PaperExemptionApproval_MultipleStuds(string oExamFormModifyRequest)
        {
            Hashtable    ht   = new Hashtable();
            DBObjectPool Pool = null;
            DBObject     oDB  = null;
            string       TFlag;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();

                SqlCommand cmd = new SqlCommand();
                // MySQL related change - SP name should be having less than 64 characters
                //cmd = oDB.GenerateCommand("ELGV2_PaperExemptionApproval_AddExamFormModifyRequest_MultipleStudents", ht);
                cmd = oDB.GenerateCommand("ELGV2_PpExmpApproval_AddExamFormModifyRequest_MultipleStudents", ht);

                cmd.Parameters.RemoveAt("@FormModifyRequestsXML");
                cmd.Parameters.Add("@FormModifyRequestsXML", SqlDbType.Xml);
                cmd.Parameters["@FormModifyRequestsXML"].Value = oExamFormModifyRequest;
                cmd.ExecuteNonQuery();
                TFlag = cmd.Parameters["@StatusFlag"].Value.ToString();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(TFlag);
        }
Ejemplo n.º 16
0
        internal int ReplacePRN(string sExistingPRN, string sReplacePRN, string sUser)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;
            // string[] sRes = new string[3];


            int iRows = 0;

            try
            {
                oPool = DBObjectPool.Instance;
                oDB   = oPool.AcquireDBObject();
                Hashtable oHs = new Hashtable();
                oHs.Add("Existing_PRN", sExistingPRN);
                oHs.Add("Replaced_PRN", sReplacePRN);
                oHs.Add("User", sUser);

                oCmd = oDB.GenerateCommand("ELGV2_ReplacePRN", oHs);

                iRows = oCmd.ExecuteNonQuery();
            }
            catch (Exception ex) {
                throw (ex);
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(iRows);
        }
Ejemplo n.º 17
0
        internal string SaveCETDetails(Hashtable oHs)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;
            // string[] sRes = new string[3];
            string sRes = string.Empty;

            int iRows = 0;

            try
            {
                oPool = DBObjectPool.Instance;
                oDB   = oPool.AcquireDBObject();
                oCmd  = oDB.GenerateCommand("Elgv2_SaveCETDetails", oHs);

                iRows = oCmd.ExecuteNonQuery();
                // if (iRows > 0)
                // {
                sRes = oCmd.Parameters["@Status"].Value.ToString();
                //}
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(sRes);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Cancel student admission
        /// </summary>
        /// <param name="ht"></param>
        /// <returns>N for Success, Y for Failure, E for Exists in Exam form</returns>
        public string CancelAdmission(Hashtable ht)
        {
            string       sReturnData = string.Empty;;
            SqlCommand   cmd         = new SqlCommand();
            DBObjectPool Pool        = null;
            DBObject     oDB         = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                ht.Add("ErrorOccurred", ParameterDirection.Output);

                //cmd = oDB.GenerateCommand("Elgv2_CancelStudentAdmission", ht);
                cmd = oDB.GenerateCommand("ELGV2_CancelAdmission_CancelAdmission", ht);
                cmd.ExecuteNonQuery();
                sReturnData = cmd.Parameters["@ErrorOccurred"].Value.ToString();
            }
            catch { sReturnData = ""; }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(sReturnData);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Seacrh student.
        /// </summary>
        /// <param name="oHs"></param>
        /// <returns></returns>
        public int UpdateStudyCenter_ForStudent(string PRN_Number, string NewRef_Pk_Institute_ID, string OldPk_Institute_ID, string facID, string courseID, string molrnID, string ptrnID, string brnID, string crPrDetailID, string crPrChildID, string fk_AcademicYear_ID, string fk_AcademicYear_Seq, string DeleteOldCancelEntry, string createdBy, string CrPr_Seq, string CrPrCh_Seq)
        {
            int          flag  = 0;
            Hashtable    oHs   = new Hashtable();
            DataTable    dt    = new DataTable();
            DBObjectPool Pool  = null;
            DBObject     oDB   = null;
            string       uniID = clsGetSettings.UniversityID.Trim();

            try
            {
                oHs.Add("Pk_Uni_ID", uniID);
                oHs.Add("PRN_Number", PRN_Number);
                oHs.Add("NewRef_Pk_Institute_ID", NewRef_Pk_Institute_ID);
                oHs.Add("OldPk_Institute_ID", OldPk_Institute_ID);
                oHs.Add("PK_Fac_ID", facID);
                oHs.Add("PK_Cr_ID", courseID);
                oHs.Add("Pk_Molrn_ID", molrnID);
                oHs.Add("Pk_Ptrn_ID", ptrnID);
                oHs.Add("Pk_Brn_ID", brnID);
                oHs.Add("Pk_CrPr_Details_ID", crPrDetailID);
                oHs.Add("Pk_CrPrCh_ID", crPrChildID);
                oHs.Add("fk_AcademicYear_ID", fk_AcademicYear_ID);
                oHs.Add("fk_AcademicYear_Seq", fk_AcademicYear_Seq);
                oHs.Add("DeleteOldCancelEntry", DeleteOldCancelEntry);
                oHs.Add("UserID", createdBy);
                oHs.Add("CrPr_Seq", CrPr_Seq);
                oHs.Add("CrPrCh_Seq", CrPrCh_Seq);
                oHs.Add("ExecutionStatus", flag);

                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();

                SqlCommand cmd = oDB.GenerateCommand("ELGV2_StudyCenterChange_ForStudent", oHs);
                cmd.ExecuteNonQuery();
                flag = Convert.ToInt32(cmd.Parameters["@ExecutionStatus"].Value);
            }

            catch (SqlException ex)
            {
                return(0);

                throw (ex);
            }

            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(flag);
        }
Ejemplo n.º 20
0
        public static DataTable CreateMercy(string PK_Year, string PK_Student, string targetXML)
        {
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            string    UniID = clsGetSettings.UniversityID.Trim();
            Hashtable objHT = new Hashtable();

            objHT.Add("pk_Year", PK_Year);
            objHT.Add("Pk_Student_Id", PK_Student);
            objHT.Add("TargetXML", targetXML);

            DataSet ds = new DataSet();

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                SqlCommand cmd = new SqlCommand();
                cmd = oDB.GenerateCommand("Results_Update_ReRegistration_Flag_For_Mercy", objHT);

                if (targetXML != null && targetXML != string.Empty)
                {
                    cmd.Parameters.RemoveAt("@TargetXML");
                    cmd.Parameters.Add("@TargetXML", SqlDbType.Xml);
                    cmd.Parameters["@TargetXML"].Value = targetXML;
                }
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(ds);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }

            if (ds != null && ds.Tables.Count != 0)
            {
                return(ds.Tables[0]);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// This function is used to associate the record from IA table with a matching record in the REG table.
        /// </summary>
        /// <param name="pk_Uni_ID"></param>
        /// <param name="pk_Year"></param>
        /// <param name="pk_Student_ID"></param>
        /// <param name="Ref_pk_Uni_ID"></param>
        /// <param name="Ref_pk_Year"></param>
        /// <param name="Ref_pk_Institute_ID"></param>
        /// <param name="Ref_pk_Student_ID"></param>
        /// <param name="ElgDecision"></param>
        /// <param name="Reason"></param>
        /// <param name="pk_CrMoLrnPtrn_ID"></param>
        /// <param name="UserID"></param>
        /// <param name="DocXML"></param>
        /// <param name="ExistingPRN"></param>
        /// <returns>It returns a string array with PRN and Eligibility Flag of the Course to which the current
        /// record gets associated.</returns>
        public static string[] Associate_Student_With_Course(string pk_Uni_ID, string pk_Year, string pk_Student_ID, string Ref_pk_Uni_ID, string Ref_pk_Year, string Ref_pk_Institute_ID, string Ref_pk_Student_ID, string ElgDecision, string Reason, string pk_CrMoLrnPtrn_ID, string UserID, System.Text.StringBuilder DocXML, string ExistingPRN)
        {
            string[]     arr  = new string[3];
            Hashtable    ht   = new Hashtable();
            SqlCommand   cmd  = new SqlCommand();
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                ht.Add("pk_Uni_ID", pk_Uni_ID);
                ht.Add("pk_Year", pk_Year);
                ht.Add("pk_Student_ID", pk_Student_ID);
                ht.Add("Ref_pk_Uni_ID", Ref_pk_Uni_ID);
                ht.Add("Ref_pk_Year", Ref_pk_Year);
                ht.Add("Ref_pk_Institute_ID", Ref_pk_Institute_ID);
                ht.Add("Ref_pk_Student_ID", Ref_pk_Student_ID);
                ht.Add("ElgDecision", ElgDecision);
                ht.Add("Reason", Reason);
                ht.Add("pk_CrMoLrnPtrn_ID", pk_CrMoLrnPtrn_ID);
                ht.Add("UserID", UserID);
                ht.Add("DocXML", DocXML.ToString());
                ht.Add("ExistingPRN", ExistingPRN);
                ht.Add("PRN", "");
                ht.Add("Flag", 0);
                ht.Add("Error", 0);
                cmd = oDB.GenerateCommand("elg_Associate_Student_With_Course", ht);
                cmd.Parameters["@PRN"].Direction   = ParameterDirection.Output;
                cmd.Parameters["@Flag"].Direction  = ParameterDirection.Output;
                cmd.Parameters["@Error"].Direction = ParameterDirection.Output;
                cmd.ExecuteNonQuery();
                arr[0] = cmd.Parameters["@PRN"].Value.ToString();
                arr[1] = cmd.Parameters["@Flag"].Value.ToString();
                arr[2] = cmd.Parameters["@Error"].Value.ToString();
                return(arr);
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
                throw(e);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
        }
        public string Modify_EligibilityRights(string pk_Uni_ID, string pk_Fac_ID, string pk_Cr_ID, string pk_MoLrn_ID, string pk_CrPtrn_ID, string Elg_Rights_Flag, string Created_By, string For_All_Coll)
        {
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            Hashtable  oHs         = new Hashtable();
            string     sReturnData = "";
            SqlCommand cmd;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();

                oHs.Add("pk_Uni_ID", pk_Uni_ID);
                oHs.Add("pk_Fac_ID", pk_Fac_ID);
                oHs.Add("pk_Cr_ID", pk_Cr_ID);
                oHs.Add("pk_MoLrn_ID", pk_MoLrn_ID);
                oHs.Add("pk_CrPtrn_ID", pk_CrPtrn_ID);
                oHs.Add("Elg_Rights_Flag", Elg_Rights_Flag);
                oHs.Add("Modified_By", Created_By);
                oHs.Add("For_All_Coll", For_All_Coll);

                cmd = oDB.GenerateCommand("Elg_Update_Eligibility_Rights", oHs);

                int i = cmd.ExecuteNonQuery();
                if (i > 0)
                {
                    sReturnData = "Y";
                }
                else
                {
                    sReturnData = "N";
                }
            }
            catch (SqlException ex)
            {
                sReturnData = "N";
                throw (ex);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(sReturnData);
        }
Ejemplo n.º 23
0
        public string ListStudentPhotoSignXML(string AcademicYearID, string UniID, string FacID, string CrID,
                                              string MoLrnID, string PtrnID, string BrnID, string CrPrID, string CrPrChID, string LowerLimit, string UpperLimit, string ExamEventID)
        {
            DBObjectPool Pool = null;

            Pool = DBObjectPool.Instance;
            DBObject oDB = Pool.AcquireDBObject();

            ht = new Hashtable();
            ht.Add("AcademicYearID", AcademicYearID);
            //shrikantb on 08102013
            ht.Add("ExamEventID", ExamEventID);
            ht.Add("UniID", UniID);
            ht.Add("FacID", FacID);
            ht.Add("CrID", CrID);
            ht.Add("MoLrnID", MoLrnID);
            ht.Add("PtrnID", PtrnID);
            ht.Add("BrnID", BrnID);
            ht.Add("CrPrID", CrPrID);
            ht.Add("CrPrChID", CrPrChID);
            ht.Add("LowerLimit", LowerLimit);
            ht.Add("UpperLimit", UpperLimit);
            System.Xml.XmlReader      oR = null;
            System.Text.StringBuilder oS = new System.Text.StringBuilder();

            try
            {
                SqlCommand cmd = oDB.GenerateCommand("ElgV2_ListStudentPhotoSignXML", ht);
                oR = cmd.ExecuteXmlReader();
                while (!oR.EOF)
                {
                    if (oR.IsStartElement())
                    {
                        oS.Append(oR.ReadOuterXml());
                        oS.Append(Environment.NewLine);
                    }
                }
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }

            return(oS.ToString());
        }
Ejemplo n.º 24
0
        //Added to Log the error while hiting to OA API

        public void WriteOAErrorLog(Hashtable oHt)
        {
            SqlCommand   cmd  = new SqlCommand();
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                oDB.ThisConnectionFor = DBConnection.DCWrite;

                cmd = oDB.GenerateCommand("REGD_CancelAdmission_OA_ErrorLog", oHt);
                cmd.ExecuteNonQuery();
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Add Selected Additional Paper Fo rAdd Paper Change
        /// </summary>
        /// <param name="oHT">Hashtable</param>
        /// <returns>string</returns>
        public string AddSelectedAdditionalPaperForAddPaperChange(Hashtable oHt)
        {
            string       flag;
            SqlCommand   cmd;
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                cmd  = oDB.GenerateCommand("ELGV2_Add_StudentAdditionalPapersForAddPaperChange", oHt);
                cmd.ExecuteNonQuery();
                flag = cmd.Parameters["@Result_Out"].Value.ToString();
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(flag);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// This will Remove the Addiotnal Papers that are Opted by student for Add Paper Change
        /// </summary>
        /// <param name="oHt"></param>
        /// <returns></returns>
        public string Remove_AdditionalPapersForAddPaperChange(Hashtable oHt)
        {
            string       flag;
            SqlCommand   cmd;
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                oHt.Add("Status_Out", ParameterDirection.Output);
                cmd = oDB.GenerateCommand("ELGV2_Remove_AdditionalPapers_ForAddPaperChange", oHt);
                cmd.ExecuteNonQuery();
                flag = cmd.Parameters["@Result_Out"].Value.ToString();
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(flag);
        }
        public static string Bulk_Process_Eligibility_Data(string Uni_ID, string Year, string Institute_ID, string pk_CrMoLrnPtrn_ID, string pk_CrPr_ID, string Student_ID, string College_Eligibility_Flag, string ElgDecision, string Reason, string UserID)
        {
            string       sReturn = "";
            Hashtable    ht      = new Hashtable();
            SqlCommand   cmd     = new SqlCommand();
            DBObjectPool Pool    = null;
            DBObject     oDB     = null;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();
                ht.Add("Uni_ID", Uni_ID);
                ht.Add("Year", Year);
                ht.Add("Institute_ID", Institute_ID);
                ht.Add("Student_ID", Student_ID);
                ht.Add("ElgDecision", ElgDecision);
                ht.Add("Reason", Reason);
                ht.Add("pk_CrMoLrnPtrn_ID", pk_CrMoLrnPtrn_ID);
                ht.Add("pk_CrPr_ID", pk_CrPr_ID);
                ht.Add("College_Eligibility_Flag", College_Eligibility_Flag);
                ht.Add("UserID", UserID);
                ht.Add("PRN", "");
                cmd = oDB.GenerateCommand("ELG_Add_BULK_DATA_PRN", ht);
                cmd.ExecuteNonQuery();
                sReturn = "Y";
                return(sReturn);
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
                sReturn = "N";
                throw (e);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
        }
        public string Add_EligibilityRights(string pk_Uni_ID, string pk_Fac_ID, string pk_Cr_ID, string pk_MoLrn_ID, string pk_CrPtrn_ID, string Elg_Rights_Flag, string Created_By, string For_All_Coll)
        {
            DBObjectPool Pool = null;
            DBObject     oDB  = null;

            Hashtable  oHS         = new Hashtable();
            string     sReturnData = "";
            SqlCommand cmd;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();

                oHS.Add("pk_Uni_ID", pk_Uni_ID);
                oHS.Add("pk_Fac_ID", pk_Fac_ID);
                oHS.Add("pk_Cr_ID", pk_Cr_ID);
                oHS.Add("pk_MoLrn_ID", pk_MoLrn_ID);
                oHS.Add("pk_CrPtrn_ID", pk_CrPtrn_ID);
                oHS.Add("Elg_Rights_Flag", Elg_Rights_Flag);
                oHS.Add("Created_By", Created_By);
                oHS.Add("For_All_Coll", For_All_Coll);

                cmd = oDB.GenerateCommand("ELG_Add_Eligibility_Rights", oHS);
                cmd.ExecuteScalar();
                sReturnData = "Y";
            }
            catch (SqlException ex)
            {
                sReturnData = "N";
                throw (ex);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(sReturnData);
        }
Ejemplo n.º 29
0
        public int ImportPRNFromExcel(string SourceTableName, string userID)
        {
            string       result;
            DBObjectPool Pool   = null;
            DBObject     oDB    = null;
            Hashtable    objHT  = new Hashtable();
            string       UniID  = clsGetSettings.UniversityID.ToString();
            int          Status = 0;

            try
            {
                Pool = DBObjectPool.Instance;
                oDB  = Pool.AcquireDBObject();

                string DCDatabase = ConfigurationManager.AppSettings["DCDataBase"];     //y
                string dbname     = (DCDatabase != "") ? DCDatabase.Split('_')[1] : ""; //y

                objHT.Add("TableName", SourceTableName);
                objHT.Add("User", userID);
                objHT.Add("ExecutionStatus", Status);
                objHT.Add("DBName", dbname);//y

                SqlCommand cmd = oDB.GenerateCommand("ELGV2_ImportPRN", objHT);
                cmd.ExecuteNonQuery();
                Status = Convert.ToInt32(cmd.Parameters["@ExecutionStatus"].Value);
            }
            catch (Exception ex)
            {
                result = ex.Message;
                return(0);
            }
            finally
            {
                Pool.ReleaseDBObject(oDB);
            }
            return(Status);
        }
        internal string DeleteConfigurations(Hashtable oHs)
        {
            DBObjectPool oPool = null;
            DBObject     oDB   = null;
            SqlCommand   oCmd;
            string       sRes = string.Empty;

            int iRows = 0;

            try
            {
                oPool = DBObjectPool.Instance;
                oDB   = oPool.AcquireDBObject();
                oCmd  = oDB.GenerateCommand("ELGV2_DeleteConfigurations", oHs);
                iRows = oCmd.ExecuteNonQuery();
                sRes  = oCmd.Parameters["@Status"].Value.ToString();
            }
            finally
            {
                oPool.ReleaseDBObject(oDB);
            }

            return(sRes);
        }