c# - Count concurrent Calls from Calllog -


There is a list of calls with start time, stoptime, duration, collars and some other properties. Now I try to imagine a concurrent call from this list, but I do not know how to start with this task. I have to feel this work in Net C #.

The first idea was to take each call, and count it in an array for every second, then I have an array that calculates the call for every second, but it seems to me That is not the case: -)

  class CallConcurrentCounterController {static zero main (string [] args) {var call = new ImportDataFromCSV (); DataTable DataTable = Call. Gate dataable (path, separator); Date time start time = new date time (2011,07,01); CallsBucket (DataTable, STARTTIME); } Public Zero Call Bucket (Datatale Call, Datetime Starttime) {var callbacks = timely in enumerable.Range (0, (60 * 24)) Select (i = & gt; Start Time.Admnates (i)) // Create Time Base Create new selection at Start Time and Current Minimum // Create an anonymous type {// Create a property named Time, which checks time Is time = time, // second property that stores the number of calls that occur at that time. // callout = call. ROS.Count (Call = & gt; Calls. Start & lt; = Time & amp; Call. Pause & gt; = Time) CallCount = Call. Anemerable (). Calculation (call = & gt; date time. (Call.ItemArray [0] .ToString () + "" + Call.ItemArray [1] .ToString ()) & lt; time & amp; DateTime.Parse (Call .ememArray [0] .ToString () + "" + call. Item array [2]. Ostring ()) gt; = time)}; }}   

The function that calls this function is given a data tab with rows in each row, there is a call with the feature item [for the initial time], stop the timepiece [2] (for stop-time), date item item [0] and some other features like caller-number ...

Now I get a bucket that calculates the call from a minute . But how can I change the type of call like the counter?

You started. It creates minutes from the initial time (covers all day, 60 hours per hour, 24 hours per day).

Then it calculates all the calls that start first, and end after that time. You can call socks at where to keep a description of the individual calls that occur during each code.

  var StartTime = New date time. today (). AddDays (-1); To start the intervals of the minute / minute intervals when the var callbacket = time in the enumerable.Range (0, (60 * 24) / minute in a minute. Select (i => New date time (starttime). Admins ( I) Create time / base on the start time and the current minute. Select new one // Create an anonymous type {// create a property named time, which checks time time = time, // another property which calls The number controls at that time. CallCount = call (Call = & gt; call.starttime & lt; = time & amp; call timetime & gt; = time)}   

Now you have been shown that you have a < Code> DataTable , see the accepted response to this question.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -