Beispiel #1
0
        public ResultEntity GetPaymentHistory(GetPaymentEntity paymentEntity)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[4];
                sqlParameter[0] = new SqlParameter("@STU_CODE", paymentEntity.stuCode);
                sqlParameter[1] = new SqlParameter("@ACADEMIC_YEAR", paymentEntity.academicYear);
                sqlParameter[2] = new SqlParameter("@COURSE", paymentEntity.courseId);
                sqlParameter[3] = new SqlParameter("@REPORT_ID", Convert.ToInt32(paymentEntity.reportId));
                DataSet ds = new DataSet();
                ds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_GET_STUDENT_PAYMENT_HISTORY", sqlParameter);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #2
0
        public ResultEntity GetFeeDetails(AccountEntity accountEntity)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                //  UserEntity objUserEntity = UserEntity.GetInstance();
                SqlParameter[] sqlParameter = new SqlParameter[4];
                sqlParameter[0] = new SqlParameter("@ACADEMIC_YEAR", accountEntity.academicYear);
                sqlParameter[1] = new SqlParameter("@COURSE", accountEntity.courseId);
                sqlParameter[2] = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[3] = new SqlParameter("@REPORT_ID", accountEntity.reportMapId);
                DataSet ds = new DataSet();
                ds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_GET_FEE_DETAILS", sqlParameter);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #3
0
        public ResultEntity GetFeeCollectionReport(string acYear, string course, string semester, string feeType, string reportType, string reportId)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                //  UserEntity objUserEntity = UserEntity.GetInstance();
                SqlParameter[] sqlParameter = new SqlParameter[7];
                sqlParameter[0] = new SqlParameter("@ACADEMIC_YEAR", acYear);
                sqlParameter[1] = new SqlParameter("@COURSE", course);
                sqlParameter[2] = new SqlParameter("@SEMESTER", semester);
                sqlParameter[3] = new SqlParameter("@FEE_TYPE", feeType);
                sqlParameter[4] = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[5] = new SqlParameter("@REPORT_TYPE", reportType);
                sqlParameter[6] = new SqlParameter("@REPORT_ID", Convert.ToInt32(reportId));
                DataSet ds = new DataSet();
                ds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_GET_FEE_COLLECTION_REPORT", sqlParameter);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #4
0
        public ResultEntity SaveFeeRecords(string records)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                //  UserEntity objUserEntity = UserEntity.GetInstance();
                SqlParameter[] sqlParameter = new SqlParameter[5];
                sqlParameter[0]           = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[1]           = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[2]           = new SqlParameter("@JSON_DATA", records);
                sqlParameter[3]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[3].Direction = ParameterDirection.Output;
                sqlParameter[3].Size      = 1;
                sqlParameter[4]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[4].Direction = ParameterDirection.Output;
                sqlParameter[4].Size      = 500;
                SqlHelper.ExecuteScalar(sqlConn, CommandType.StoredProcedure, "SP_MANAGE_FEE_DETAILS", sqlParameter);
                result.flag = sqlParameter[3].Value.ToString();
                result.msg  = sqlParameter[4].Value.ToString();
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #5
0
        public ResultEntity SavePaymentRecords(string records, string studentCode, string studentName, string acYear, string courceName, string paymentType, string paymentDate, string recieptNo)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[12];
                sqlParameter[0]            = new SqlParameter("@STU_CODE", studentCode);
                sqlParameter[1]            = new SqlParameter("@STUDENT_NAME", studentName);
                sqlParameter[2]            = new SqlParameter("@ACADEMIC_YEAR", acYear);
                sqlParameter[3]            = new SqlParameter("@COURSE", courceName);
                sqlParameter[4]            = new SqlParameter("@PAYMENT_TYPE", paymentType);
                sqlParameter[5]            = new SqlParameter("@PAYMENT_DATE", paymentDate);
                sqlParameter[6]            = new SqlParameter("@RECIEPT_NO", recieptNo);
                sqlParameter[7]            = new SqlParameter("@RECORDS", records);
                sqlParameter[8]            = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[9]            = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[10]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[10].Direction = ParameterDirection.Output;
                sqlParameter[10].Size      = 1;
                sqlParameter[11]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[11].Direction = ParameterDirection.Output;
                sqlParameter[11].Size      = 500;
                SqlHelper.ExecuteScalar(sqlConn, CommandType.StoredProcedure, "SP_STUDENT_FEE_PAYMENT", sqlParameter);
                result.flag = sqlParameter[10].Value.ToString();
                result.msg  = sqlParameter[11].Value.ToString();
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #6
0
        private void GetReportColumns(string reportType, int formID, string reportName, string rptColumns, string rptColAlias)
        {
            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[8];
                sqlParameter[0] = new SqlParameter("@PI_REPORT_TYPE", reportType);
                sqlParameter[1] = new SqlParameter("@PI_FORM_ID", formID);

                sqlParameter[2] = new SqlParameter("@PI_REPORT_ID", formID);
                sqlParameter[3] = new SqlParameter("@PI_REPORT_NAME", reportName);

                sqlParameter[4] = new SqlParameter("@PI_COLUMNS", rptColumns);
                sqlParameter[5] = new SqlParameter("@PI_COL_ALIAS", rptColAlias);

                sqlParameter[6]           = new SqlParameter("@PO_RSP_FLAG", SqlDbType.NVarChar);
                sqlParameter[6].Direction = ParameterDirection.Output;
                sqlParameter[6].Size      = 1;
                sqlParameter[7]           = new SqlParameter("@PO_RSP_MSG", SqlDbType.NVarChar);
                sqlParameter[7].Direction = ParameterDirection.Output;
                sqlParameter[7].Size      = 500;
                SqlHelper.ExecuteNonQuery(sqlConn, CommandType.StoredProcedure, "SP_INSERT_REPORT_CONFIG", sqlParameter);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
            }
        }
Beispiel #7
0
        public ResultEntity AddFeeDetails(AccountEntity accountEntity)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                //  UserEntity objUserEntity = UserEntity.GetInstance();
                SqlParameter[] sqlParameter = new SqlParameter[15];
                sqlParameter[0]  = new SqlParameter("@ID", accountEntity.typeid);
                sqlParameter[1]  = new SqlParameter("@FEE_NAME", accountEntity.feeName);
                sqlParameter[2]  = new SqlParameter("@PAYMENT_TYPE", accountEntity.paymentType);
                sqlParameter[3]  = new SqlParameter("@MONTH", accountEntity.feeMonth);
                sqlParameter[4]  = new SqlParameter("@TERMS", Convert.ToInt32(accountEntity.feePeriod));
                sqlParameter[5]  = new SqlParameter("@DESCRIPTION", accountEntity.feeDesc);
                sqlParameter[6]  = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[7]  = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[8]  = new SqlParameter("@IS_ACTIVE", accountEntity.isActive);
                sqlParameter[9]  = new SqlParameter("@OPER_TYPE", accountEntity.flag);
                sqlParameter[10] = new SqlParameter("@FEE_SUBMISSION", accountEntity.feeSubmission);
                sqlParameter[11] = new SqlParameter("@FEE_RELAXATION", accountEntity.feeRelaxDay);
                sqlParameter[12] = new SqlParameter("@REPORT_ID", accountEntity.reportId);

                sqlParameter[13]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[13].Direction = ParameterDirection.Output;
                sqlParameter[13].Size      = 1;
                sqlParameter[14]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[14].Direction = ParameterDirection.Output;
                sqlParameter[14].Size      = 500;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_MANAGE_FEE_TYPE", sqlParameter);
                result.flag = sqlParameter[13].Value.ToString();
                result.msg  = sqlParameter[14].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #8
0
        public ResultEntity AddDuration(DurationEntity durationEntity)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[13];
                sqlParameter[0] = new SqlParameter("@DUR_ID", durationEntity.id);
                sqlParameter[1] = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[2] = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[3] = new SqlParameter("@YEAR_ID", durationEntity.academicYear);
                sqlParameter[4] = new SqlParameter("@COURSE_ID", durationEntity.courseId);
                sqlParameter[5] = new SqlParameter("@NO_OF_SEMESTER", durationEntity.semester);
                sqlParameter[6] = new SqlParameter("@START_DATE", durationEntity.wefDate);
                sqlParameter[7] = new SqlParameter("@END_DATE", durationEntity.wetDate);
                sqlParameter[8] = new SqlParameter("@IS_ACTIVE", durationEntity.active);
                sqlParameter[9] = new SqlParameter("@OPER_TYPE", durationEntity.flag);

                sqlParameter[10] = new SqlParameter("@REPORT_ID", Convert.ToInt32(durationEntity.reportId));

                sqlParameter[11]           = new SqlParameter("@FLAG", System.Data.SqlDbType.NVarChar);
                sqlParameter[11].Direction = ParameterDirection.Output;
                sqlParameter[11].Size      = 1;
                sqlParameter[12]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[12].Direction = ParameterDirection.Output;
                sqlParameter[12].Size      = 500;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_COURSE_DURATION", sqlParameter);
                result.flag = sqlParameter[11].Value.ToString();
                result.msg  = sqlParameter[12].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #9
0
        public ResultEntity AddSubject(SubjectEntity subjectEntity)
        {
            objUserEntity = (UserEntity)HttpContext.Current.Session["UserDetails"];
            ResultEntity result = new ResultEntity();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[13];
                sqlParameter[0]            = new SqlParameter("@SUBJECT_ID", subjectEntity.subjectId);
                sqlParameter[1]            = new SqlParameter("@SUBJECT_CODE", subjectEntity.subjectCode);
                sqlParameter[2]            = new SqlParameter("@SUBJECT_NAME", subjectEntity.subjectName);
                sqlParameter[3]            = new SqlParameter("@SUBJECT_SHORT_NAME", subjectEntity.shortName);
                sqlParameter[4]            = new SqlParameter("@SUBJECT_MEDIUM", subjectEntity.medium);
                sqlParameter[5]            = new SqlParameter("@SUBJECT_TYPE", subjectEntity.subjectType);
                sqlParameter[6]            = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[7]            = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[8]            = new SqlParameter("@IS_ACTIVE", subjectEntity.active);
                sqlParameter[9]            = new SqlParameter("@REPORT_ID", Convert.ToInt32(subjectEntity.reportId));
                sqlParameter[10]           = new SqlParameter("@OPER_TYPE", subjectEntity.flag);
                sqlParameter[11]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[11].Direction = ParameterDirection.Output;
                sqlParameter[11].Size      = 1;
                sqlParameter[12]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[12].Direction = ParameterDirection.Output;
                sqlParameter[12].Size      = 500;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_SUBJECT", sqlParameter);
                result.flag = sqlParameter[11].Value.ToString();
                result.msg  = sqlParameter[12].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #10
0
        public ResultEntity AddHoliday(HolidayListEntity holidayEntity)
        {
            objUserEntity = (UserEntity)HttpContext.Current.Session["UserDetails"];
            ResultEntity result = new ResultEntity();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[12];
                sqlParameter[0]            = new SqlParameter("@ACADEMIC_ID", holidayEntity.acyr);
                sqlParameter[1]            = new SqlParameter("@HOLIDAY_ID", holidayEntity.hldy);
                sqlParameter[2]            = new SqlParameter("@START_DATE", holidayEntity.wfDate);
                sqlParameter[3]            = new SqlParameter("@END_DATE", holidayEntity.wtDate);
                sqlParameter[4]            = new SqlParameter("@RH_ID", holidayEntity.res);
                sqlParameter[5]            = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[6]            = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[7]            = new SqlParameter("@IS_ACTIVE", holidayEntity.active);
                sqlParameter[8]            = new SqlParameter("@REPORT_ID", Convert.ToInt32(holidayEntity.reportId));
                sqlParameter[9]            = new SqlParameter("@OPER_TYPE", holidayEntity.flag);
                sqlParameter[10]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[10].Direction = ParameterDirection.Output;
                sqlParameter[10].Size      = 1;
                sqlParameter[11]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[11].Direction = ParameterDirection.Output;
                sqlParameter[11].Size      = 500;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_HOLIDAY_LIST", sqlParameter);
                result.flag = sqlParameter[10].Value.ToString();
                result.msg  = sqlParameter[11].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #11
0
        public ResultEntity GetPaymentDeatils(GetPaymentEntity paymentEntity)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                //  UserEntity objUserEntity = UserEntity.GetInstance();
                SqlParameter[] sqlParameter = new SqlParameter[9];
                sqlParameter[0] = new SqlParameter("@STU_CODE", paymentEntity.stuCode);
                sqlParameter[1] = new SqlParameter("@ACADEMIC_YEAR", paymentEntity.academicYear);
                sqlParameter[2] = new SqlParameter("@COURSE", paymentEntity.courseId);
                sqlParameter[3] = new SqlParameter("@CUSTOMER_ID", paymentEntity.customerId);
                sqlParameter[4] = new SqlParameter("@REPORT_ID", Convert.ToInt32(paymentEntity.reportId));


                sqlParameter[5]           = new SqlParameter("@RECIEPT_NO", SqlDbType.Char);
                sqlParameter[5].Direction = ParameterDirection.Output;
                sqlParameter[5].Size      = 200;
                sqlParameter[6]           = new SqlParameter("@PAYMENT_TYPE", SqlDbType.NVarChar);
                sqlParameter[6].Direction = ParameterDirection.Output;
                sqlParameter[6].Size      = 2;
                sqlParameter[7]           = new SqlParameter("@REMARKS", SqlDbType.NVarChar);
                sqlParameter[7].Direction = ParameterDirection.Output;
                sqlParameter[7].Size      = 500;
                sqlParameter[8]           = new SqlParameter("@PAYMENT_DATE", SqlDbType.NVarChar);
                sqlParameter[8].Direction = ParameterDirection.Output;
                sqlParameter[8].Size      = 500;



                DataSet ds = new DataSet();
                ds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_GET_STUDENT_FEE_PAY_LIST", sqlParameter);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #12
0
        public ResultEntity AddActivity(ActivityEntity activityEntity, string customerId, string userid)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[12];
                sqlParameter[0]            = new SqlParameter("@ACTIVITY_ID", activityEntity.actId);
                sqlParameter[1]            = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[2]            = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[3]            = new SqlParameter("@ACTIVITY_NAME", activityEntity.actName);
                sqlParameter[4]            = new SqlParameter("@ACTIVITY_TYPE", activityEntity.actType);
                sqlParameter[5]            = new SqlParameter("@START_DATE", activityEntity.wfDate);
                sqlParameter[6]            = new SqlParameter("@END_DATE", activityEntity.wetDate);
                sqlParameter[7]            = new SqlParameter("@IS_ACTIVE", activityEntity.active);
                sqlParameter[8]            = new SqlParameter("@OPER_TYPE", activityEntity.flag);
                sqlParameter[9]            = new SqlParameter("@REPORT_ID", activityEntity.reportId);
                sqlParameter[10]           = new SqlParameter("@FLAG", System.Data.SqlDbType.NVarChar);
                sqlParameter[10].Direction = ParameterDirection.Output;
                sqlParameter[10].Size      = 1;
                sqlParameter[11]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[11].Direction = ParameterDirection.Output;
                sqlParameter[11].Size      = 500;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_ACTIVITY", sqlParameter);
                result.flag = sqlParameter[10].Value.ToString();
                result.msg  = sqlParameter[11].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #13
0
        public ResultEntity AddMappingDetails(MappingEntity mapping)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[11];
                sqlParameter[0] = new SqlParameter("@ID", mapping.mapId);
                sqlParameter[1] = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[2] = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[3] = new SqlParameter("@COURSE_ID", Convert.ToInt32(mapping.course));
                sqlParameter[4] = new SqlParameter("@SEMESTER", Convert.ToInt32(mapping.semester));
                sqlParameter[5] = new SqlParameter("@SUBJECT_ID", Convert.ToInt32(mapping.subject));
                sqlParameter[6] = new SqlParameter("@IS_ACTIVE", mapping.active);
                sqlParameter[7] = new SqlParameter("@OPER_TYPE", mapping.flag);

                sqlParameter[8]            = new SqlParameter("@REPORT_ID", mapping.reportId);
                sqlParameter[9]            = new SqlParameter("@FLAG", System.Data.SqlDbType.NVarChar);
                sqlParameter[9].Direction  = ParameterDirection.Output;
                sqlParameter[9].Size       = 1;
                sqlParameter[10]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[10].Direction = ParameterDirection.Output;
                sqlParameter[10].Size      = 500;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_COURSE_MAPPING", sqlParameter);
                result.flag = sqlParameter[9].Value.ToString();
                result.msg  = sqlParameter[10].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #14
0
        public ResultEntity SectionDetails(SectionEntity sectionEntity)
        {
            ResultEntity result        = new ResultEntity();
            UserEntity   objUserEntity = UserEntity.GetInstance();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[11];
                sqlParameter[0]            = new SqlParameter("@SECTION_ID", sectionEntity.sectionId);
                sqlParameter[1]            = new SqlParameter("@COURSE_ID", Convert.ToInt32(sectionEntity.courseId));
                sqlParameter[2]            = new SqlParameter("@SEMESTER_ID", sectionEntity.semesterId);
                sqlParameter[3]            = new SqlParameter("@SECTION_NAME", sectionEntity.sectionName);
                sqlParameter[4]            = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[5]            = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[6]            = new SqlParameter("@IS_ACTIVE", sectionEntity.isActive);
                sqlParameter[7]            = new SqlParameter("@REPORT_ID", Convert.ToInt32(sectionEntity.reportId));
                sqlParameter[8]            = new SqlParameter("@OPER_TYPE", sectionEntity.operType);
                sqlParameter[9]            = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[9].Direction  = ParameterDirection.Output;
                sqlParameter[9].Size       = 1;
                sqlParameter[10]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[10].Direction = ParameterDirection.Output;
                sqlParameter[10].Size      = 200;

                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_SECTION", sqlParameter);
                result.flag = sqlParameter[9].Value.ToString();
                result.msg  = sqlParameter[10].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #15
0
        public ResultEntity AddCourse(CourseEntity courseEntity)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                objUserEntity = (UserEntity)HttpContext.Current.Session["UserDetails"];
                SqlParameter[] sqlParameter = new SqlParameter[11];
                sqlParameter[0]            = new SqlParameter("@COURSE_ID", courseEntity.courserId);
                sqlParameter[1]            = new SqlParameter("@CUSTOMER_ID", objUserEntity.customerId);
                sqlParameter[2]            = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[3]            = new SqlParameter("@COURSE_TYPE", courseEntity.courseType);
                sqlParameter[4]            = new SqlParameter("@COURSE_NAME", courseEntity.courseName);
                sqlParameter[5]            = new SqlParameter("@NO_OF_SEMESTER", courseEntity.noOfSemester);
                sqlParameter[6]            = new SqlParameter("@IS_ACTIVE", courseEntity.active);
                sqlParameter[7]            = new SqlParameter("@OPER_TYPE", courseEntity.flag);
                sqlParameter[8]            = new SqlParameter("@REPORT_ID", Convert.ToInt32(courseEntity.reportId));
                sqlParameter[9]            = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[9].Direction  = ParameterDirection.Output;
                sqlParameter[9].Size       = 1;
                sqlParameter[10]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[10].Direction = ParameterDirection.Output;
                sqlParameter[10].Size      = 500;
                DataSet ds = new DataSet();
                ds          = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_COURSE", sqlParameter);
                result.flag = sqlParameter[9].Value.ToString();
                result.msg  = sqlParameter[10].Value.ToString();

                if (result.flag.ToUpper() == "S")
                {
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                        }
                    }
                }

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #16
0
 public string GetCourseDDL(string ddlType)
 {
     try
     {
         SqlDataReader  dr;
         SqlParameter[] sqlParameter = new SqlParameter[2];
         sqlParameter[0] = new SqlParameter("@P_FLAG", '2');
         sqlParameter[1] = new SqlParameter("@DDL_TYPE", ddlType);
         dr = SqlHelper.ExecuteReader(sqlConn, CommandType.StoredProcedure, "SP_GET_COURSE_SEM_DETAILS", sqlParameter);
         string details = CommonFunc.RdrToJSON(dr);
         return(details);
     }
     catch (Exception ex)
     {
         Excep.WriteException(ex);
         return("");
     }
 }
Beispiel #17
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                context.Response.ContentType = "text/plain";
                context.Response.Write("Hello World");

                HttpPostedFile postedFile = context.Request.Files[0];
                if (postedFile != null)
                {
                    string pic  = System.IO.Path.GetFileName(postedFile.FileName + DateTime.Now.ToString());
                    string path = System.IO.Path.Combine(HttpContext.Current.Server.MapPath("~/Content/images/"), pic);
                    postedFile.SaveAs(path);
                }
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
            }
        }
Beispiel #18
0
        public SqlDataReader GetDropDownData(string ddlType, char flag)
        {
            string        details = string.Empty;
            SqlDataReader dr      = null;

            try
            {
                string         sqlConn      = System.Configuration.ConfigurationManager.ConnectionStrings["CS"].ConnectionString;
                SqlParameter[] sqlParameter = new SqlParameter[2];

                sqlParameter[0] = new SqlParameter("@P_FLAG", flag);
                sqlParameter[1] = new SqlParameter("@DDL_TYPE", ddlType);
                dr = SqlHelper.ExecuteReader(sqlConn, CommandType.StoredProcedure, "SP_GET_DROPDOWN_DATA", sqlParameter);
                return(dr);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(dr);
            }
        }
Beispiel #19
0
        public ResultEntity GetEmployee(EmployeeEntity employeeEntity)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                UserEntity objUserEntity = UserEntity.GetInstance();

                SqlParameter[] sqlParameter = new SqlParameter[11];
                string         empFullName  = employeeEntity.empFirst + employeeEntity.empLast;
                sqlParameter[0]  = new SqlParameter("@EMP_CODE", employeeEntity.empCode);
                sqlParameter[1]  = new SqlParameter("@EMPLOYEE_NAME", empFullName);
                sqlParameter[2]  = new SqlParameter("@DEPARTMENT", employeeEntity.empDept);
                sqlParameter[3]  = new SqlParameter("@DESIGNATION", employeeEntity.empDesig);
                sqlParameter[4]  = new SqlParameter("@EMPLOYEE_TYPE", employeeEntity.empType);
                sqlParameter[5]  = new SqlParameter("@STATE", employeeEntity.empState);
                sqlParameter[6]  = new SqlParameter("@CITY", employeeEntity.empCity);
                sqlParameter[7]  = new SqlParameter("@LOGIN_ID", employeeEntity.empLogin);
                sqlParameter[8]  = new SqlParameter("@ROLE", employeeEntity.empRole);
                sqlParameter[9]  = new SqlParameter("@CUSTOMER_ID", Convert.ToInt32(objUserEntity.customerId));
                sqlParameter[10] = new SqlParameter("@REPORT_ID", Convert.ToInt32(employeeEntity.reportId));
                DataSet ds = new DataSet();
                ds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_GET_EMPLOYEE_DETAILS", sqlParameter);
                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #20
0
        public ResultEntity GetStudent(StudentEntity studentEntity)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                UserEntity objUserEntity = UserEntity.GetInstance();

                SqlParameter[] sqlParameter = new SqlParameter[9];
                string         stuFullName  = studentEntity.stuFirst + studentEntity.stuLast;
                sqlParameter[0] = new SqlParameter("@STU_CODE", studentEntity.stuCode);
                sqlParameter[1] = new SqlParameter("@STUDENT_NAME", stuFullName);
                sqlParameter[2] = new SqlParameter("@COURSE", studentEntity.stuCourse);
                sqlParameter[3] = new SqlParameter("@SEMESTER", studentEntity.stuSemester);
                sqlParameter[4] = new SqlParameter("@ACADEMIC_YEAR", studentEntity.stuAcade);
                sqlParameter[5] = new SqlParameter("@CATEGORY", studentEntity.stuCategory);
                sqlParameter[6] = new SqlParameter("@LOGIN_ID", studentEntity.stuLogin);
                sqlParameter[7] = new SqlParameter("@CUSTOMER_ID", Convert.ToInt32(objUserEntity.customerId));
                sqlParameter[8] = new SqlParameter("@REPORT_ID", Convert.ToInt32(studentEntity.reportId));
                DataSet ds = new DataSet();
                ds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_GET_STUDENT_DETAILS", sqlParameter);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #21
0
        public ResultEntity AddEmployee(EmployeeEntity employeeEntity)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                UserEntity     objUserEntity = UserEntity.GetInstance();
                SqlParameter[] sqlParameter  = new SqlParameter[47];

                sqlParameter[0]  = new SqlParameter("@EMP_CODE", employeeEntity.empCode);
                sqlParameter[1]  = new SqlParameter("@FIRST_NAME", employeeEntity.empFirst);
                sqlParameter[2]  = new SqlParameter("@LAST_NAME", employeeEntity.empLast);
                sqlParameter[3]  = new SqlParameter("@QUALIFICATION", employeeEntity.empQuali);
                sqlParameter[4]  = new SqlParameter("@DEPARTMENT", employeeEntity.empDept);
                sqlParameter[5]  = new SqlParameter("@DESIGNATION", employeeEntity.empDesig);
                sqlParameter[6]  = new SqlParameter("@EMPLOYEE_TYPE", employeeEntity.empType);
                sqlParameter[7]  = new SqlParameter("@JOB_TYPE", employeeEntity.empJType);
                sqlParameter[8]  = new SqlParameter("@FATHER_NAME", employeeEntity.empFather);
                sqlParameter[9]  = new SqlParameter("@MOTHER_NAME", employeeEntity.empMother);
                sqlParameter[10] = new SqlParameter("@SEX", employeeEntity.empSex);
                sqlParameter[11] = new SqlParameter("@DATE_OF_BIRTH", employeeEntity.empDOB);
                sqlParameter[12] = new SqlParameter("@DATE_OF_JOINING", employeeEntity.empDOJ);
                sqlParameter[13] = new SqlParameter("@SPOOUSE_NAME", employeeEntity.empSpoou);
                sqlParameter[14] = new SqlParameter("@BLOOD_GROUP", employeeEntity.empBGrp);
                sqlParameter[15] = new SqlParameter("@MARITAL_STATUS", employeeEntity.empMStat);
                sqlParameter[16] = new SqlParameter("@NATIONALITY", employeeEntity.empNation);
                sqlParameter[17] = new SqlParameter("@ADDRESS_LINE_1", employeeEntity.empAdres);
                sqlParameter[18] = new SqlParameter("@ADDRESS_LINE_2", employeeEntity.empAdres2);
                sqlParameter[19] = new SqlParameter("@MOBILE_NO", employeeEntity.empMobile);
                sqlParameter[20] = new SqlParameter("@PHONE_NO", employeeEntity.empPhone);
                sqlParameter[21] = new SqlParameter("@STATE", employeeEntity.empState);
                sqlParameter[22] = new SqlParameter("@CITY", employeeEntity.empCity);
                sqlParameter[23] = new SqlParameter("@ZIPCODE", employeeEntity.empZip);
                sqlParameter[24] = new SqlParameter("@L_EMPLOYER_NAME", employeeEntity.preEmp);
                sqlParameter[25] = new SqlParameter("@L_DATE_OF_JOINING", employeeEntity.preDOJ);
                sqlParameter[26] = new SqlParameter("@L_DATE_OF_LEAVING", employeeEntity.preDOL);
                sqlParameter[27] = new SqlParameter("@L_PHONE", employeeEntity.prePhone);
                sqlParameter[28] = new SqlParameter("@L_EXPERIENCE", employeeEntity.empExpre);
                sqlParameter[29] = new SqlParameter("@L_REASON", employeeEntity.empResLeav);
                sqlParameter[30] = new SqlParameter("@L_SALARY", employeeEntity.preSal);
                sqlParameter[31] = new SqlParameter("@SUBJECTS", employeeEntity.empSub);
                sqlParameter[32] = new SqlParameter("@BANK_NAME", employeeEntity.empBank);
                sqlParameter[33] = new SqlParameter("@BANK_ACCOUNT", employeeEntity.empAccNo);
                sqlParameter[34] = new SqlParameter("@IFSC_CODE", employeeEntity.empIFSC);
                sqlParameter[35] = new SqlParameter("@ADDHAR_NO", employeeEntity.empAdhar);
                sqlParameter[36] = new SqlParameter("@PF_NUMBER", employeeEntity.empPF);
                sqlParameter[37] = new SqlParameter("@SALARY", employeeEntity.empSalary);
                sqlParameter[38] = new SqlParameter("@LOGIN_ID", employeeEntity.empLogin);
                sqlParameter[39] = new SqlParameter("@PASSWORD", employeeEntity.empPwd);
                sqlParameter[40] = new SqlParameter("@ROLE_ID", employeeEntity.empRole);
                sqlParameter[41] = new SqlParameter("@ACCOUNT_STATUS", employeeEntity.empAccStat);
                sqlParameter[42] = new SqlParameter("@CUSTOMER_ID", Convert.ToInt32(objUserEntity.customerId));
                sqlParameter[43] = new SqlParameter("@USER_ID", objUserEntity.userId);
                //sqlParameter[16] = new SqlParameter("@P_IMG_PATH", employeeEntity.imgPath);
                sqlParameter[44] = new SqlParameter("@OPER_TYPE", employeeEntity.flag);

                sqlParameter[45]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[45].Direction = ParameterDirection.Output;
                sqlParameter[45].Size      = 1;
                sqlParameter[46]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[46].Direction = ParameterDirection.Output;
                sqlParameter[46].Size      = 500;

                DataSet ds    = new DataSet();
                int     count = SqlHelper.ExecuteNonQuery(sqlConn, CommandType.StoredProcedure, "SP_MANAGE_EMPLOYEE", sqlParameter);
                result.flag = sqlParameter[45].Value.ToString();
                result.msg  = sqlParameter[46].Value.ToString();

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #22
0
        public ResultEntity AddStudent(StudentEntity studentEntity)
        {
            ResultEntity result = new ResultEntity();

            // var file= studentEntity.postedFile[0];

            String timeStamp = DateTime.Now.ToString();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[54];
                sqlParameter[0]            = new SqlParameter("@STU_CODE", studentEntity.stuCode);
                sqlParameter[1]            = new SqlParameter("@FIRST_NAME", studentEntity.stuFirst);
                sqlParameter[2]            = new SqlParameter("@LAST_NAME", studentEntity.stuLast);
                sqlParameter[3]            = new SqlParameter("@COURSE", studentEntity.stuCourse);
                sqlParameter[4]            = new SqlParameter("@SEMESTER", studentEntity.stuSemester);
                sqlParameter[5]            = new SqlParameter("@CATEGORY", studentEntity.stuCategory);
                sqlParameter[6]            = new SqlParameter("@ACADEMIC_YEAR", studentEntity.stuAcade);
                sqlParameter[7]            = new SqlParameter("@FATHER_NAME", studentEntity.stuFather);
                sqlParameter[8]            = new SqlParameter("@MOTHER_NAME", studentEntity.stuMother);
                sqlParameter[9]            = new SqlParameter("@GENDER", studentEntity.stuSex);
                sqlParameter[10]           = new SqlParameter("@DATE_OF_BIRTH", studentEntity.stuDOB);
                sqlParameter[11]           = new SqlParameter("@BLOOD_GROUP", studentEntity.stuBGrp);
                sqlParameter[12]           = new SqlParameter("@NATIONALITY", studentEntity.stuNation);
                sqlParameter[13]           = new SqlParameter("@M_TONGUE", studentEntity.stuMTongue);
                sqlParameter[14]           = new SqlParameter("@BIRTH_PLACE", studentEntity.stuBirPlace);
                sqlParameter[15]           = new SqlParameter("@IS_HANDICAP", studentEntity.stuHandi);
                sqlParameter[16]           = new SqlParameter("@PARENT_INCOME", studentEntity.stuPIncome);
                sqlParameter[17]           = new SqlParameter("@ADDRESS_LINE_1", studentEntity.stuAdres);
                sqlParameter[18]           = new SqlParameter("@ADDRESS_LINE_2", studentEntity.stuAdres2);
                sqlParameter[19]           = new SqlParameter("@STATE", studentEntity.stuState);
                sqlParameter[20]           = new SqlParameter("@CITY", studentEntity.stuCity);
                sqlParameter[21]           = new SqlParameter("@ZIP_CODE", studentEntity.stuZip);
                sqlParameter[22]           = new SqlParameter("@MOBILE", studentEntity.stuMobile);
                sqlParameter[23]           = new SqlParameter("@PHONE", studentEntity.stuPhone);
                sqlParameter[24]           = new SqlParameter("@EMAIL", studentEntity.stuEmail);
                sqlParameter[25]           = new SqlParameter("@SUBJECT", studentEntity.stuSub);
                sqlParameter[26]           = new SqlParameter("@P_INSTITUTE", studentEntity.stuInst);
                sqlParameter[27]           = new SqlParameter("@P_BOARD", studentEntity.stuBoard);
                sqlParameter[28]           = new SqlParameter("@P_COURSE", studentEntity.stuPreCourse);
                sqlParameter[29]           = new SqlParameter("@P_YEAR", studentEntity.couCompli);
                sqlParameter[30]           = new SqlParameter("@P_MARKS", studentEntity.stuMarks);
                sqlParameter[31]           = new SqlParameter("@P_PERCENTAGE", studentEntity.stuPercent);
                sqlParameter[32]           = new SqlParameter("@LOGIN_ID", studentEntity.stuLogin);
                sqlParameter[33]           = new SqlParameter("@PASSWORD", Encrypt(studentEntity.stuPwd));
                sqlParameter[34]           = new SqlParameter("@ACCOUNT_STATUS", studentEntity.stuAccStat);
                sqlParameter[35]           = new SqlParameter("@CUSTOMER_ID", Convert.ToInt32(objUserEntity.customerId));
                sqlParameter[36]           = new SqlParameter("@USER_ID", objUserEntity.userId);
                sqlParameter[37]           = new SqlParameter("@IMAGE", (studentEntity.stuImage));
                sqlParameter[38]           = new SqlParameter("@TRANSPORT", (studentEntity.stuTrans));
                sqlParameter[39]           = new SqlParameter("@ROUTE_NAME", (studentEntity.stuRoute));
                sqlParameter[40]           = new SqlParameter("@VEHICLE_TYPE", (studentEntity.stuVehTyp));
                sqlParameter[41]           = new SqlParameter("@VEHICLE", (studentEntity.stuVehNo));
                sqlParameter[42]           = new SqlParameter("@TRAN_AMT", (studentEntity.stuVecAmt));
                sqlParameter[43]           = new SqlParameter("@STOP_NAME", (studentEntity.stuVehStop));
                sqlParameter[44]           = new SqlParameter("@HOSTEL", (studentEntity.stuHostel));
                sqlParameter[45]           = new SqlParameter("@HOSTEL_NAME", (studentEntity.stuHostelName));
                sqlParameter[46]           = new SqlParameter("@FLOOR", (studentEntity.stuHostelFlr));
                sqlParameter[47]           = new SqlParameter("@ROOM_TYPE", (studentEntity.stuRoomTyp));
                sqlParameter[48]           = new SqlParameter("@ROOM_NO", (studentEntity.stuRoomNo));
                sqlParameter[49]           = new SqlParameter("@BED_NO", (studentEntity.stuBedNo));
                sqlParameter[50]           = new SqlParameter("@HOST_PRICE", (studentEntity.stuHostPrc));
                sqlParameter[51]           = new SqlParameter("@SECTION", (studentEntity.sectionName));
                sqlParameter[52]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[52].Direction = ParameterDirection.Output;
                sqlParameter[52].Size      = 1;
                sqlParameter[53]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[53].Direction = ParameterDirection.Output;
                sqlParameter[53].Size      = 500;

                DataSet ds    = new DataSet();
                int     count = SqlHelper.ExecuteNonQuery(sqlConn, CommandType.StoredProcedure, "SP_MANAGE_STUDENT", sqlParameter);
                result.flag = sqlParameter[52].Value.ToString();
                result.msg  = sqlParameter[53].Value.ToString();

                //if (result.flag.ToUpper() == "S")
                //{
                //    if (count >0)
                //    {
                //        if (ds.Tables[0].Rows.Count > 0)
                //        {
                //            result.addParams = CommonFunc.DtToJSON(ds.Tables[0]);
                //        }
                //    }
                //}

                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }
Beispiel #23
0
        public ResultEntity CheckLogin(string email, string password)
        {
            ResultEntity result = new ResultEntity();

            try
            {
                SqlParameter[] sqlParameter = new SqlParameter[5];
                sqlParameter[0] = new SqlParameter("@LOGIN_ID", email);
                sqlParameter[1] = new SqlParameter("@PASSWORD", Encrypt(password));

                sqlParameter[2]           = new SqlParameter("@USER_TYPE", SqlDbType.Char);
                sqlParameter[2].Direction = ParameterDirection.Output;
                sqlParameter[2].Size      = 50;
                sqlParameter[3]           = new SqlParameter("@FLAG", SqlDbType.Char);
                sqlParameter[3].Direction = ParameterDirection.Output;
                sqlParameter[3].Size      = 1;
                sqlParameter[4]           = new SqlParameter("@MSG", SqlDbType.NVarChar);
                sqlParameter[4].Direction = ParameterDirection.Output;
                sqlParameter[4].Size      = 200;
                DataSet ds = new DataSet();
                ds              = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "SP_CHECK_LOGIN", sqlParameter);
                result.flag     = sqlParameter[3].Value.ToString();
                result.msg      = sqlParameter[4].Value.ToString();
                result.userType = sqlParameter[2].Value.ToString();


                UserEntity objUserEntity = UserEntity.GetInstance();

                if (result.flag.ToUpper() == "S")
                {
                    HttpContext.Current.Session["ModuelInfo"] = ds.Tables[0];
                    if (result.userType == "2")
                    {
                        objUserEntity.userId       = ds.Tables[1].Rows[0]["USER_ID"].ToString();
                        objUserEntity.firstName    = ds.Tables[1].Rows[0]["FIRST_NAME"].ToString();
                        objUserEntity.lastName     = ds.Tables[1].Rows[0]["LAST_NAME"].ToString();
                        objUserEntity.fatherName   = ds.Tables[1].Rows[0]["FATHER_NAME"].ToString();
                        objUserEntity.motherName   = ds.Tables[1].Rows[0]["MOTHER_NAME"].ToString();
                        objUserEntity.gender       = ds.Tables[1].Rows[0]["GENDER"].ToString();
                        objUserEntity.dob          = ds.Tables[1].Rows[0]["DATE_OF_BIRTH"].ToString();
                        objUserEntity.course       = ds.Tables[1].Rows[0]["COURSE"].ToString();
                        objUserEntity.semester     = ds.Tables[1].Rows[0]["SEMESTER"].ToString();
                        objUserEntity.category     = ds.Tables[1].Rows[0]["CATEGORY"].ToString();
                        objUserEntity.academicYear = ds.Tables[1].Rows[0]["ACADEMIC_YEAR"].ToString();
                        //objUserEntity.admissionDate = ds.Tables[1].Rows[0]["ADMISSION_DATE"].ToString();
                        //objUserEntity.isActive = ds.Tables[1].Rows[0]["IS_ACTIVE"].ToString();
                        objUserEntity.accountLocked = ds.Tables[1].Rows[0]["ACCOUNT_LOCKED"].ToString();
                    }
                    else
                    {
                        objUserEntity.userId    = ds.Tables[1].Rows[0]["USER_ID"].ToString();
                        objUserEntity.deptId    = ds.Tables[1].Rows[0]["DEPARTMENT"].ToString();
                        objUserEntity.desigId   = ds.Tables[1].Rows[0]["DESIGNATION"].ToString();
                        objUserEntity.firstName = ds.Tables[1].Rows[0]["FIRST_NAME"].ToString();
                        //objUserEntity.middleName = ds.Tables[1].Rows[0]["MIDDLE_NAME"].ToString();
                        objUserEntity.lastName = ds.Tables[1].Rows[0]["LAST_NAME"].ToString();
                        objUserEntity.gender   = ds.Tables[1].Rows[0]["GENDER"].ToString();
                        objUserEntity.joinDate = ds.Tables[1].Rows[0]["JOINING_DATE"].ToString();
                        //objUserEntity.isActive = ds.Tables[1].Rows[0]["IS_ACTIVE"].ToString();
                        objUserEntity.accountLocked = ds.Tables[1].Rows[0]["ACCOUNT_LOCKED"].ToString();
                        objUserEntity.role          = ds.Tables[1].Rows[0]["ROLE"].ToString();


                        //role should be there//gender
                    }

                    if (ds.Tables[2].Rows.Count == 1)
                    {
                        objUserEntity.customerId   = ds.Tables[2].Rows[0]["CUSTOMER_ID"].ToString();
                        objUserEntity.customerName = ds.Tables[2].Rows[0]["CUSTOMER_NAME"].ToString();
                        objUserEntity.address      = ds.Tables[2].Rows[0]["ADDRESS"].ToString();
                        objUserEntity.city         = ds.Tables[2].Rows[0]["CITY"].ToString();
                        objUserEntity.mobile       = ds.Tables[2].Rows[0]["MOBILE"].ToString();
                        objUserEntity.website      = ds.Tables[2].Rows[0]["WEBSITE"].ToString();
                        objUserEntity.faxNo        = ds.Tables[2].Rows[0]["FAX_NO"].ToString();
                        objUserEntity.cEmail       = ds.Tables[2].Rows[0]["EMAIL_ADDRESS"].ToString();
                        objUserEntity.panNo        = ds.Tables[2].Rows[0]["PAN_NO"].ToString();
                        objUserEntity.cActive      = ds.Tables[2].Rows[0]["IS_ACTIVE"].ToString();
                        objUserEntity.state        = ds.Tables[2].Rows[0]["STATE"].ToString();
                        objUserEntity.pinCode      = ds.Tables[2].Rows[0]["PIN_CODE"].ToString();
                    }
                    else
                    {
                        result.addParams = CommonFunc.DtToJSON(ds.Tables[2]);
                    }

                    HttpContext.Current.Session["UserDetails"] = objUserEntity;
                }
                return(result);
            }
            catch (Exception ex)
            {
                Excep.WriteException(ex);
                return(result);
            }
        }