public DataSet GetBirthYearList(tbl_MemberMasterSearchProp Objtbl_MemberMasterSearchProp)
 {
     try
     {
         tbl_MemberMasterDAL Objtbl_MemberMasterDAL = new tbl_MemberMasterDAL();
         return(Objtbl_MemberMasterDAL.GetBirthYearList(Objtbl_MemberMasterSearchProp));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public DataSet GetBirthYearList(tbl_MemberMasterSearchProp Objtbl_MemberMasterSearchProp)
 {
     try
     {
         //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
         //DbCommand DBCmd = DB.GetStoredProcCommand("GetBirthYearList");
         //DB.AddInParameter(DBCmd, "@StartYear", DbType.Int32, Objtbl_MemberMasterSearchProp.sAgeStart);
         //DB.AddInParameter(DBCmd, "@EndYear", DbType.Int32, Objtbl_MemberMasterSearchProp.sAgeUpto);
         //return DB.ExecuteDataSet(DBCmd);
         return(null);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public DataSet Load_ProfileList(tbl_MemberMasterSearchProp Objtbl_MemberMasterSearchProp, ref int TotalCount)
        {
            SqlCommand cmdToExecute = new SqlCommand();

            cmdToExecute.CommandText = "Load_ProfileList";
            cmdToExecute.CommandType = CommandType.StoredProcedure;
            DataSet        ds = new DataSet();
            SqlDataAdapter da = null;

            cmdToExecute.Connection = objdb.objConnection;
            int _TotalCount = 0;

            try
            {
                objdb.GetConnStr();
                cmdToExecute.Parameters.Add(new SqlParameter("@MemberCode", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sMemberCode));
                cmdToExecute.Parameters.Add(new SqlParameter("@Gender", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sGender));
                cmdToExecute.Parameters.Add(new SqlParameter("@AgeStart", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sAgeStart));

                cmdToExecute.Parameters.Add(new SqlParameter("@AgeUpto", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sAgeUpto));
                cmdToExecute.Parameters.Add(new SqlParameter("@MaritalStatusList", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sMaritalStatus));
                cmdToExecute.Parameters.Add(new SqlParameter("@EducationList", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sEducation));
                cmdToExecute.Parameters.Add(new SqlParameter("@CasteList", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sCaste));
                cmdToExecute.Parameters.Add(new SqlParameter("@CountryList", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sCountry));
                cmdToExecute.Parameters.Add(new SqlParameter("@StateCityList", SqlDbType.NVarChar, 120, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sStateCity));

                cmdToExecute.Parameters.Add(new SqlParameter("@SqlCondition", SqlDbType.Bit, 2, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.sSqlCondition));
                cmdToExecute.Parameters.Add(new SqlParameter("@PageNo", SqlDbType.Int, 6, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.PageNo));
                cmdToExecute.Parameters.Add(new SqlParameter("@RecordCount", SqlDbType.Int, 6, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_MemberMasterSearchProp.RecordCount));
                cmdToExecute.Parameters.Add(new SqlParameter("@TotalCount", SqlDbType.Int, 5, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Proposed, _TotalCount));

                da = new SqlDataAdapter(cmdToExecute);
                da.Fill(ds);
                TotalCount = Convert.ToInt32(cmdToExecute.Parameters["@TotalCount"].Value);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            return(ds);
        }
        public DataSet Load_ProfileList(tbl_MemberMasterSearchProp Objtbl_MemberMasterSearchProp, ref int PageCount, ref int RecordCount)
        {
            try
            {
                if (Objtbl_MemberMasterSearchProp.PageNo == 0 && Objtbl_MemberMasterSearchProp.sMemberCode != -1)
                {
                    Objtbl_MemberMasterSearchProp.PageNo      = 1;
                    Objtbl_MemberMasterSearchProp.RecordCount = 8;
                }
                //int RecordCount = 0;
                tbl_MemberMasterDAL Objtbl_MemberMasterDAL = new tbl_MemberMasterDAL();
                DataSet             dsData = Objtbl_MemberMasterDAL.Load_ProfileList(Objtbl_MemberMasterSearchProp, ref RecordCount);

                if (Objtbl_MemberMasterSearchProp.sMemberCode != -1)
                {
                    double Page = Convert.ToDouble(RecordCount) / Convert.ToDouble(Objtbl_MemberMasterSearchProp.RecordCount);
                    if (dsData.Tables[0].Rows.Count > 0)
                    {
                        string[] PageDecimal = Page.ToString().Split('.');
                        if (PageDecimal.Length > 1 && Convert.ToInt32(PageDecimal[1]) > 0)
                        {
                            PageCount = Convert.ToInt32(Page.ToString().Split('.')[0]) + 1;
                        }
                        else
                        {
                            PageCount = Convert.ToInt32(Page);
                        }
                    }
                    else
                    {
                        PageCount = 0;
                    }
                }
                return(dsData);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }