Esempio n. 1
0
        internal SqlDataReader getUserDetails(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT u.name,u.address,ur.userRole from [user] u INNER JOIN UserRole ur ON u.userRoleId = ur.userRoleId where userId =" + boObject.userId;
            return(sqlHelper.ExecuteReader(command));
        }
Esempio n. 2
0
        internal SqlDataReader getShopDetails(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT name,address from shop where shopid = " + boObject.shopId;
            return(sqlHelper.ExecuteReader(command));
        }
Esempio n. 3
0
        internal SqlDataReader getNewCustomerDetails(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT CustomerName, address from NewCustomer where TempMShopId like  '" + boObject.TempShopId + "'";
            return(sqlHelper.ExecuteReader(command));
        }
Esempio n. 4
0
        internal ShopBO.ShopData GetRouteOutlets(ShopBO shopBo)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(shopBo.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspGetRouteOutlets";
            sqlHelper.AddParameter(command, "@BeatPlanId", shopBo.BeatPlanId, ParameterDirection.Input);
            SqlDataReader reader = sqlHelper.ExecuteReader(command);

            ShopBO.ShopData shopData = new ShopBO.ShopData();
            shopData.ShopList = new List <ShopBO.Shop>();
            while (reader.Read())
            {
                ShopBO.Shop shop = new ShopBO.Shop();
                shop.ShopId = Convert.ToInt32(reader["ShopId"]);
                shop.Name   = Convert.ToString(reader["Name"]);
                shopData.ShopList.Add(shop);
            }
            reader.Close();
            return(shopData);
        }