示例#1
0
        public static void LogCustomerService(CustomerService _service)
        {
            var baseservice = ServicesDAL.GetService(_service.id);
            var getservice  = GetServicesDAL.GetService(_service.id);

            string logstr = DateTime.Now.ToShortDateString() + '\t' + getservice.phoneunumber + '\t' + baseservice.name + '\t' + baseservice.price + '\t' + getservice.price + '\t' + new DateTime(getservice.starttime).ToString() + '\t' + new DateTime(getservice.endtime).ToString() + "\n";

            File.AppendAllText("I:\\test.txt", logstr);
        }
        public object Get(string id)
        {
            var result = ServicesDAL.GetService(id);

            if (result == null)
            {
                return(NotFound());
            }
            else
            {
                return(result);
            }
        }
示例#3
0
        public ActionResult Index(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            objServices = new ServicesDAL();
            var service = objServices.GetService(id);

            if (service == null)
            {
                return(HttpNotFound());
            }
            return(View(service));
        }