public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string phone = context.Request["CheckPhone"];

            if (context.Request["buyId"] != null)
            {
                int res = AdminMng.CheckBuy(Convert.ToInt32(context.Request["buyId"]));
                if (res == 0)
                {
                    context.Response.Write("ok");
                }
                else
                {
                    context.Response.Write("no");
                }
                return;
            }
            if (PersonSvc.RetrieveByPhone(phone).Count != 0)
            {
                context.Response.Write("no");
                return;
            }
            context.Response.Write("ok");
        }
예제 #2
0
    public string UpdateDateEndOfMovieAndDeleteEmptyScreenings(string MovieID, string DateEnd)
    {
        AdminMng aa  = new AdminMng();
        string   msg = aa.UpdateDateEndOfMovieAndDeleteEmptyScreenings(MovieID, DateEnd);

        return(msg);
    }
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            List <Person> p = new List <Person>();
            List <Good>   g = new List <Good>();
            List <Buy>    b = new List <Buy>();

            AdminMng.GetBuyAll(ref b, ref g, ref p);
            List <BuyShow> bss = new List <BuyShow>();

            for (int i = 0; i < p.Count; ++i)
            {
                BuyShow bs = new BuyShow();
                bs.person = p[i];
                bs.good   = g[i];
                bs.buy    = b[i];
                bs.sum    = b[i].Num * g[i].Value;
                bss.Add(bs);
            }
            bss.Reverse(0, bss.Count);
            var    Data = new { data = bss };
            string html = CommonHelper.RenderHtml("check.html", Data);

            context.Response.Write(html);
        }
예제 #4
0
    public int InsertNewScreening(string Date, int CinemaID, int Price, string MovieID)
    {
        AdminMng act = new AdminMng();
        int      msg = act.InsertNewScreening(Date, CinemaID, Price, MovieID);

        return(msg);
    }
예제 #5
0
    public int DeleteOldMovies()
    {
        AdminMng act = new AdminMng();
        int      msg = act.DeleteOldMovies();

        return(msg);
    }
예제 #6
0
    public int DeleteScreeningID(int ScreeningID)
    {
        AdminMng mng = new AdminMng();
        int      msg = mng.DeleteScreeningID(ScreeningID);

        return(msg);
    }
예제 #7
0
    public DataSet Details()
    {
        AdminMng mng = new AdminMng();
        DataSet  ds  = mng.Details();

        return(ds);
    }
 public void ProcessRequest(HttpContext context)
 {
     if (context.Request["phone"] == null && context.Request["val"] == null)
     {
         context.Response.ContentType = "text/html";
         List <Person> list = new List <Person>();
         AdminMng.QueryPersonAll(ref list);
         var    Data = new { persons = list };
         string html = CommonHelper.RenderHtml("userMng.html", Data);
         context.Response.Write(html);
         return;
     }
     else if (context.Request["phone"] != null && context.Request["val"] != null)
     {
         context.Response.ContentType = "text/plain";
         string phone  = context.Request["phone"];
         int    val    = Convert.ToInt32(context.Request["val"]);
         Person person = new Person();
         AdminMng.QueryPersonByPhone(phone, ref person);
         person.Value = val;
         int res = AdminMng.EditPerson(person);
         if (res == 0)
         {
             context.Response.Write("ok");
         }
         else
         {
             context.Response.Write("no");
         }
     }
 }
예제 #9
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            if (context.Request["phone"] == null)
            {
                return;
            }
            string phone  = context.Request["phone"];
            Person person = new Person();

            AdminMng.QueryPersonByPhone(phone, ref person);
            List <Value> list = new List <Value>();

            PersonMng.GetValue(person.Id, ref list);
            list.Reverse(0, list.Count);
            var    Data = new { values = list, value = person.Value };
            string html = CommonHelper.RenderHtml("valueHistory.html", Data);

            context.Response.Write(html);
        }
예제 #10
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            if (context.Request["goodId"] == null || context.Request["phone"] == null)
            {
                return;
            }
            Person person = new Person();

            AdminMng.QueryPersonByPhone(context.Request["phone"], ref person);
            Good good = new Good();

            PersonMng.GetGoodById(Convert.ToInt32(context.Request["goodId"]), ref good);
            Buy buy = new Buy();

            buy.PersonId = person.Id;
            buy.GoodId   = good.Id;
            buy.IsCheck  = false;
            buy.Num      = Convert.ToInt32(context.Request["num"]);
            buy.Date     = System.DateTime.Now.ToString();
            PersonMng.AddBuy(buy);
            context.Response.Redirect("goodHandler.ashx");
            return;
        }
예제 #11
0
    public void UpdateTicketPrice(int SundayToThursday, int Weekend)
    {
        AdminMng action = new AdminMng();

        action.UpdateTicketPrice(SundayToThursday, Weekend);
    }
예제 #12
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            Person person = new Person();

            AdminMng.QueryPersonByPhone(context.Request["phone"], ref person);

            /*
             * if (context.Request["goodId"] != null)
             * {
             *  Good good = new Good();
             *  PersonMng.GetGoodById(Convert.ToInt32(context.Request["goodId"]), ref good);
             *  Buy buy = new Buy();
             *  buy.PersonId = person.Id;
             *  buy.GoodId = good.Id;
             *  buy.IsCheck = false;
             *  buy.Num = Convert.ToInt32(context.Request["num"]);
             *  buy.Date = System.DateTime.Now.ToString();
             *  PersonMng.AddBuy(buy);
             *  context.Response.Redirect("goodHandler.ashx");
             *  return;
             * }
             * if (person.IsAdmin == true)
             * {
             *  List<Person> p = new List<Person>();
             *  List<Good> g = new List<Good>();
             *  List<Buy> b = new List<Buy>();
             *  AdminMng.GetBuyAll(ref b, ref g, ref p);
             *  List<BuyShow> bss = new List<BuyShow>();
             *  for (int i = 0; i < p.Count; ++i)
             *  {
             *      BuyShow bs = new BuyShow();
             *      bs.person = p[i];
             *      bs.good = g[i];
             *      bs.buy = b[i];
             *      bs.sum = b[i].Num * g[i].Value;
             *      bss.Add(bs);
             *  }
             *  bss.Reverse(0, bss.Count);
             *  var Data = new { data = bss };
             *  string html = CommonHelper.RenderHtml("check.html", Data);
             *  context.Response.Write(html);
             * }
             * else
             * {*/
            List <Person> p = new List <Person>();
            List <Good>   g = new List <Good>();
            List <Buy>    b = new List <Buy>();

            PersonMng.GetBuy(person.Id, ref b, ref g, ref p);
            List <BuyShow> bss = new List <BuyShow>();

            for (int i = 0; i < p.Count; ++i)
            {
                BuyShow bs = new BuyShow();
                bs.person = p[i];
                bs.good   = g[i];
                bs.buy    = b[i];
                bs.sum    = b[i].Num * g[i].Value;
                bss.Add(bs);
            }
            bss.Reverse(0, bss.Count);
            var    Data = new { data = bss };
            string html = CommonHelper.RenderHtml("history.html", Data);

            context.Response.Write(html);
            //}
        }
예제 #13
0
    public void VipPrice(int VipCost)
    {
        AdminMng act = new AdminMng();

        act.VipPrice(VipCost);
    }