在C#项目中需要帮助 [英] Need Help in C# Project

查看:72
本文介绍了在C#项目中需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



任何人都可以帮我写一个项目的方法代码。



我正在建立一个POS系统,每天24小时,3班(上午7点至下午3点,下午11点至下午11点,下午1点至7点)。我想每天处理每个POS运营商的所有销售。



我对第三班的销售感到困惑。我如何管理第三班的销售(因为它是在2天即今天的1小时和明天的7小时)。

所有的POS运营商都会在轮班结束时前往财务经理,将移交销售交给他。财务经理有一个模块,他收到钱并在一个表名称中输入记录,包括经理ID,用户ID,日期/时间和金钱。



什么是最好的完成所有这些过程的步骤。要么我必须提出2个查询才能从销售表中获得今天的销售额,今天从现金表中支付,以设定运营商的余额或其他任何东西???



请帮助我找到一些简单的方法来获得第三班员工的销售。



祝福

解决方案

这不是一个单一答案的问题,它与公司实际上做了什么作为其程序的一部分。如果它计算一个日,因为Shift 1开始转换1开始(有些人做)那么如果它将一天计为午夜到午夜则会出现另一个问题,因为所有记录的基础都会发生变化。



我可能会将所有信息记录为ItemID,StaffId,DateTimeSale,Value,并将报告作为一个单独的问题处理:获取班次信息是检查班次开始时间的情况,加上一个班次。

所以如果你使用的是SQL:

  SELECT  *  FROM  myTable  WHERE  StaffId = 1234  AND  DateTimeSale  BETWEEN  '  2013-06-15 23: 00:00'  AND  DATEADD(hh, 8 '  2013-06-15 23:00:00'


Hello All There,

Can anyone help me in writing one method code of my project.

I am creating a POS system which runs 24 hours a day with 3 shifts(7AM-3PM,3PM-11PM,11PM-7AM). I want to handle all the sales of each POS operator daily.

I am confused on the sales of third shift. How i can manage third shift sales(coz it is coming in 2 days that is 1 hour of today and 7 hours of tomorrow).
All the POS operators are going to Finance Manager on the end of shift to hand over shift sale to him. Finance Manager has a module where he is receiving money and entering records in one table name Cash with Manager id, User id, date/time and money.

What are best steps to go through all this process. Either i have to make 2 queries to get today 's sales from sales table and today 's paid from Cash table to set balance amount of operator or anything else ???

Kindly help me in finding some easy way to get sale of third shift employees.

Best Wishes

解决方案

This isn't a question with a single answer, it's closely related to what the company actually does as part of its procedures. If it counts a "day" as Shift 1 start to Shift 1 start (and some do) then it's a different problem to if it counts a day as midnight to midnight, because the basis for all records changes.

I would probably record all information as "ItemID, StaffId, DateTimeSale, Value" and work on reporting as a separate issue: getting info for a shift is a case of checking for a shift start time, plus a shift length.
So if you were using SQL:

SELECT * FROM myTable WHERE StaffId=1234 AND DateTimeSale BETWEEN '2013-06-15 23:00:00' AND DATEADD(hh, 8, '2013-06-15 23:00:00')


这篇关于在C#项目中需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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