C#basick,预订门票后需要帮助来倒计票 [英] C# basick, need help to count down tickets after tickets were booked

查看:115
本文介绍了C#basick,预订门票后需要帮助来倒计票的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在预订后制作一个倒计票的功能。



我尝试了什么:



I need to make a function to count down tickets after booking.

What I have tried:

Please could you help me with a code for:



public List< int> MakeBooking(字符串电影,字符串scheduledBy,int numberOfTickect)

{

抛出新的ArgumentException();



// List< int> result = new List< int>();

// result.Add(movie,bookedBy,numberOfTickect);

//返回



}


public List<int> MakeBooking(string movie, string bookedBy, int numberOfTickect)
{
throw new ArgumentException();

// List<int> result = new List<int>();
// result.Add(movie, bookedBy, numberOfTickect);
// return

}

推荐答案

我们非常愿意帮助那些陷入困境的人:但这并不意味着我们在这里做这一切都适合你!我们不能做所有的工作,你要么得到报酬,要么是你的成绩的一部分,我们为你做这一切都不公平。



所以我们需要你做这项工作,当你遇到困难时我们会帮助你。这并不意味着我们会为您提供一步一步的解决方案!

首先解释您目前的位置,以及流程的下一步是什么。然后告诉我们你试图让下一步工作,以及当你做了什么时发生了什么。



但是...你所展示的注释掉的代码不会出现工作,甚至不是轻微的:你需要学习邻近的局部变量,范围,参数,返回值,以及...几乎所有的东西。帮自己一个大忙,从一开始就重新阅读你的诅咒笔记 - 因为代码似乎说你没有正确地学习任何基础知识,并且在你做之前试图修复没有任何意义!
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

But ... the commented out code you show is not going to work, not even slightly: you need to learn abut local variables, scope, parameters, return values, and ... well pretty much everything really. Do yourself a big favour, and re-read your curse notes from the beginning - because that code seems to say that you haven't learned any of the basics properly, and there is no point in trying to "fix" that until you do!


请准确更新您的问题,没有人会为您编写代码。



您可以保留计数在预订后或预订前预订或计算运行时间。



如果您的数据库中有最大预订数量,您应该阻止预订,您可以点击查看最终确定预订周期,或者您应该在预订屏幕前检查它作为验证的一部分。



您只需在预订后屏幕前查看预订号码,你在哪里被困?
Please update your question with exact need, no one will write the code for you.

You can keep count of booking or calculate it run time after the booking or before booking.

You should prevent booking if you have maximum number of booking in your database, You can check it on click of finalization of a booking cycle or you should check it before booking screen as a part of validation.

You just have to check the number of booking before a after booking screen, Where have you stuck ?


这篇关于C#basick,预订门票后需要帮助来倒计票的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆