Exemplo n.º 1
0
            public object Execute(Peanut.RequestType type)
            {
                if (type == Peanut.RequestType.POST)
                {
                    Result = string.Format("value:{0}", Number);
                }

                return(this);
            }
Exemplo n.º 2
0
 public object Execute(Peanut.RequestType type)
 {
     if (OutpuType == "xml")
     {
         return(new Peanut.OutputObject(User, new Peanut.XMLContractAttribute()));
     }
     else
     {
         return(new Peanut.OutputObject(User, new Peanut.JSONContractAttribute()));
     }
 }
Exemplo n.º 3
0
 public object Execute(Peanut.RequestType type)
 {
     if (type == Peanut.RequestType.POST)
     {
         if (!string.IsNullOrEmpty(YouName))
         {
             Data = string.Format("holle {0} :) Peanut  is .net mvc framework!", YouName);
         }
     }
     return(this);
 }
Exemplo n.º 4
0
            public object Execute(Peanut.RequestType type)
            {
                DataPage.PageSize = 1;
                if (DataPage.PageIndex < 0)
                {
                    DataPage.PageIndex = 0;
                }
                IList <DBModule.Supplier> items = Codes.Service.Supplier.List(DataPage);

                if (items.Count > 0)
                {
                    Item = items[0];
                }
                return(this);
            }
Exemplo n.º 5
0
            public object Execute(Peanut.RequestType type)
            {
                DataPage.PageSize = 1;
                if (DataPage.PageIndex < 0)
                {
                    DataPage.PageIndex = 0;
                }

                IList <Category> items = Codes.Service.Category.List(DataPage);

                if (items.Count > 0)
                {
                    Item = items[0];
                }
                Products = Codes.Service.Product.ListAtCategory(Item.CategoryID);
                return(this);
            }
Exemplo n.º 6
0
            public object Execute(Peanut.RequestType type)
            {
                DataPage.PageSize = 1;
                if (DataPage.PageIndex < 0)
                {
                    DataPage.PageIndex = 0;
                }
                IList <DBModule.Order> items = Codes.Service.Order.List(DataPage);

                if (items.Count > 0)
                {
                    Item = items[0];
                }
                Employees = Codes.Service.Employee.List();
                Customers = Codes.Service.Customer.List();
                Details   = Codes.Service.Order.GetDetail(Item.OrderID);
                return(this);
            }
Exemplo n.º 7
0
 public object Execute(Peanut.RequestType type)
 {
     return(this);
 }