コード例 #1
0
 public DataSet Select_Data(tbl_CountryProp Objtbl_CountryProp, ref int TotalCount, int CountryCode)
 {
     try
     {
         DataSet dsData = objdb.ExecuteDataset("Select_tbl_Country", CountryCode, 1, 100, 0);
         //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
         //DbCommand DBCmd = DB.GetStoredProcCommand("Select_tbl_Country");
         //DB.AddInParameter(DBCmd, "@CountryCode", DbType.Int32, Objtbl_CountryProp.CountryCode);
         //DB.AddInParameter(DBCmd, "@PageNo", DbType.Int32, Objtbl_CountryProp.PageNo);
         //DB.AddInParameter(DBCmd, "@RecordCount", DbType.Int32, Objtbl_CountryProp.RecordCount);
         //DB.AddOutParameter(DBCmd, "@TotalCount", DbType.Int32, 18);
         //DataSet dsData = DB.ExecuteDataSet(DBCmd);
         //TotalCount = Convert.ToInt32(DBCmd.Parameters["@TotalCount"].Value);
         TotalCount = 100;
         return(dsData);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        public string CheckLogin(string UserName, string Password)
        {
            string strUserName = "";

            try
            {
                DataSet ds = objDb.ExecuteDataset("dbo.CheckAdminLogin", UserName, Password);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        strUserName = Convert.ToString(ds.Tables[0].Rows[0][0]);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString(ex.Message));
                objEventLoging.AppErrlog("Error In Global.CheckLogin()" + ex.ToString());
            }
            return(strUserName);
        }
コード例 #3
0
        public DataSet GetSaveList()
        {
            DataSet ds = new DataSet();

            try
            {
                if (lblFrmName.Text == Global.fAnnualIncome)
                {
                    tbl_AnnualIncomeBAL  objbal = new tbl_AnnualIncomeBAL();
                    tbl_AnnualIncomeProp objtbl_tbl_AnnualIncome = new tbl_AnnualIncomeProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_tbl_AnnualIncome, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fAnnualIncomeCurrency)
                {
                    tbl_AnnualIncomeCurrencyBAL  objbal = new tbl_AnnualIncomeCurrencyBAL();
                    tbl_AnnualIncomeCurrencyProp objtbl_tbl_AnnualIncome = new tbl_AnnualIncomeCurrencyProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_tbl_AnnualIncome, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fBloodGroup)
                {
                    tbl_BloodGroupBAL  objbal      = new tbl_BloodGroupBAL();
                    tbl_BloodGroupProp objtbl_prop = new tbl_BloodGroupProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fCaste)
                {
                    tbl_CasteBAL  objbal      = new tbl_CasteBAL();
                    tbl_CasteProp objtbl_prop = new tbl_CasteProp();
                    int           PageCount   = 0;
                    ds = objbal.Select_Data(objtbl_prop, 0, ref PageCount);
                }
                else if (lblFrmName.Text == Global.fCountry)
                {
                    tbl_CountryBAL  objbal      = new tbl_CountryBAL();
                    tbl_CountryProp objtbl_prop = new tbl_CountryProp();
                    int             PageCount   = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fEducation)
                {
                    tbl_EducationBAL  objbal      = new tbl_EducationBAL();
                    tbl_EducationProp objtbl_prop = new tbl_EducationProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fMembershipType)
                {
                    tbl_MembershipTypeBAL  objbal      = new tbl_MembershipTypeBAL();
                    tbl_MembershipTypeProp objtbl_prop = new tbl_MembershipTypeProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fOccupation)
                {
                    tbl_OccupationBAL  objbal      = new tbl_OccupationBAL();
                    tbl_OccupationProp objtbl_prop = new tbl_OccupationProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fProfileCreatedBy)
                {
                    tbl_ProfileCreatedByBAL  objbal      = new tbl_ProfileCreatedByBAL();
                    tbl_ProfileCreatedByProp objtbl_prop = new tbl_ProfileCreatedByProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fVisaStatus)
                {
                    tbl_VisaStatusBAL  objbal      = new tbl_VisaStatusBAL();
                    tbl_VisaStatusProp objtbl_prop = new tbl_VisaStatusProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fWorkingAs)
                {
                    tbl_WorkingAsBAL  objbal      = new tbl_WorkingAsBAL();
                    tbl_WorkingAsProp objtbl_prop = new tbl_WorkingAsProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fWorkingWith)
                {
                    tbl_WorkingWithBAL  objbal      = new tbl_WorkingWithBAL();
                    tbl_WorkingWithProp objtbl_prop = new tbl_WorkingWithProp();
                    int PageCount = 0;
                    ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fMaritalStatus)
                {
                    //tbl_WorkingWithBAL objbal = new tbl_WorkingWithBAL();
                    //tbl_WorkingWithProp objtbl_prop = new tbl_WorkingWithProp();
                    //int PageCount = 0;
                    //ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                }
                else if (lblFrmName.Text == Global.fWorkType)
                {
                    //tbl_WorkingWithBAL objbal = new tbl_WorkingWithBAL();
                    //tbl_WorkingWithProp objtbl_prop = new tbl_WorkingWithProp();
                    //int PageCount = 0;
                    //ds = objbal.Select_Data(objtbl_prop, ref PageCount, 0);
                    strSQL = "Select * from tbl_WorkType";
                    ds     = objDb.ExecuteDataset(strSQL);
                }
                else if (lblFrmName.Text == Global.fEmployeeMaster)
                {
                    strSQL = "Select * from tbl_EmployeeMaster";
                    ds     = objDb.ExecuteDataset(strSQL);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString(ex.Message));
                this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmCommonMaster.GetSaveList() " + ex.ToString());
            }
            return(ds);
        }