Exemple #1
0
        public string FindUnitPushRate(string locationCode, string UnitSize, bool ClimateControlled)
        {
            CallCenterWs Call = new CallCenterWs();

            string sCorporateCode = "CAEV";

            string sUserName = "******";
            string sPassword = "******";

            DataSet   UnitTypePriceList = Call.UnitTypePriceList(sCorporateCode, locationCode, sUserName, sPassword);
            DataTable UnitInformation   = UnitTypePriceList.Tables["Table"];

            DataTable od = new DataTable();

            organizeUnitPriceInfo(UnitInformation, od);

            string pushRate = "";

            for (int i = 0; i < od.Rows.Count; i++)
            {
                if (od.Rows[i][0].ToString() == UnitSize && od.Rows[i][2].ToString() == ClimateControlled.ToString())
                {
                    double h = Convert.ToDouble(od.Rows[i][1]);
                    pushRate = string.Format("{0:0.00}", Math.Truncate(h * 10) / 10);
                    i        = od.Rows.Count - 1;
                }
                else
                {
                    pushRate = "N/A";
                }
            }

            return(pushRate);
        }
Exemple #2
0
        public string FindAvailableUnits(string locationCode, string UnitSize, bool ClimateControlled)
        {
            CallCenterWs Call = new CallCenterWs();

            string sCorporateCode = "CAEV";
            string sUserName      = "******";
            string sPassword      = "******";

            DataSet   UnitTypePriceList = Call.UnitTypePriceList(sCorporateCode, locationCode, sUserName, sPassword);
            DataTable UnitPrices        = UnitTypePriceList.Tables["Table"];
            DataTable od = new DataTable();

            organizeUnitPriceInfo(UnitPrices, od);

            string availibility = "";
            string g;
            int    h = 0;

            for (int i = 0; i < od.Rows.Count; i++)
            {
                if (od.Rows[i][0].ToString() == UnitSize && od.Rows[i][2].ToString() == ClimateControlled.ToString())
                {
                    g = od.Rows[i][3].ToString();
                    h = Int32.Parse(g);
                    i = od.Rows.Count - 1;
                }
            }
            if (h == 0)
            {
                availibility = "Waitlist";
            }
            else if (h > 3)
            {
                availibility = "Reserve";
            }
            else if (h < 4 && h > 0)
            {
                availibility = "Rent Today";
            }


            return(availibility);
        }