public bool CheckSession()
        {
            try
            {
                if (Session["userName"] != null)
                {
                    return(true);
                }
                else
                {
                    cShoeType niShoeType   = new cShoeType();
                    cShoe     niShoe       = new cShoe();
                    DataSet   dsShoesTypes = new DataSet();
                    DataSet   dsShoe       = new DataSet();
                    string    sErrMessage  = "";
                    niShoeType.GetShoesTypes(out dsShoesTypes, out sErrMessage);
                    niShoe.GetShoes(out dsShoe, out sErrMessage);
                    List <cShoesByType> poShoesByType = new List <cShoesByType>();
                    niShoe.GetShoes(dsShoesTypes, dsShoe, out poShoesByType, out sErrMessage);

                    ViewBag.ShoesByType = poShoesByType;
                    ViewBag.ShoeTypes   = dsShoesTypes;
                    return(false);
                }
            }
            catch (Exception ex)
            {
                cUtilities.WriteLog(ex.Message, out sErrMessage);
                sErrMessage = ex.Message;
                return(false);
            }
        }
Beispiel #2
0
        public ActionResult SubPrincipal()
        {
            try
            {
                cShoeType niShoeType   = new cShoeType();
                cShoe     niShoe       = new cShoe();
                DataSet   dsShoesTypes = new DataSet();
                DataSet   dsShoe       = new DataSet();
                string    sErrMessage  = "";
                niShoeType.GetShoesTypes(out dsShoesTypes, out sErrMessage);
                niShoe.GetShoes(out dsShoe, out sErrMessage);
                List <cShoesByType> poShoesByType = new List <cShoesByType>();
                niShoe.GetShoes(dsShoesTypes, dsShoe, out poShoesByType, out sErrMessage);

                ViewBag.ShoesByType = poShoesByType;
                ViewBag.ShoeTypes   = dsShoesTypes;
                return(View());
            }
            catch (Exception)
            {
                return(View());
            }
        }