public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <Management> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.management[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.Name);
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #2
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <PhoneLineEmployee> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < mask.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.phoneLineEmployee[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[1].Item1)
                {
                    row.Add(item.Employee.Name);
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <MobilePhone> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < mask.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.mobilePhone[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.IMEI);
                }
                if (show[1].Item1)
                {
                    row.Add(item.Model);
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #4
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, List <ManagementsMobilePhoneExpense> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (show[j].Item1)
                {
                    headers.Add(SD.managementMobilePhoneExpenses[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.Management);
                }
                if (show[1].Item1)
                {
                    row.Add(item.Calls.ToString());
                }
                if (show[3].Item1)
                {
                    row.Add(item.SMS.ToString());
                }
                if (show[5].Item1)
                {
                    row.Add(item.GPRS.ToString());
                }
                if (show[7].Item1)
                {
                    row.Add(item.Total.ToString());
                }
                if (show[9].Item1)
                {
                    row.Add(item.Percent.ToString());
                }
                if (show[11].Item1)
                {
                    row.Add(SD.Months[item.Month]);
                }
                if (show[12].Item1)
                {
                    row.Add(item.Year.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #5
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <SMS> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < mask.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.sms[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[1].Item1)
                {
                    row.Add(item.DateTime.ToString());
                }
                if (show[4].Item1)
                {
                    row.Add(item.E_R);
                }
                if (show[5].Item1)
                {
                    row.Add(item.Location);
                }
                if (show[6].Item1)
                {
                    row.Add(item.Destination);
                }
                if (show[7].Item1)
                {
                    row.Add(item.Total.ToString());
                }
                if (show[9].Item1)
                {
                    row.Add(item.Roaming.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #6
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <MobilePhoneCall> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.mobilePhoneCalls[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[1].Item1)
                {
                    row.Add(item.DateTime.ToString());
                }
                if (show[4].Item1)
                {
                    row.Add(item.Addressee);
                }
                if (show[5].Item1)
                {
                    row.Add(item.TotalCost.ToString());
                }
                if (show[7].Item1)
                {
                    row.Add(item.RoamingCall.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #7
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <CallingPlanAssignment> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < mask.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.callingPlanAssignment[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[1].Item1)
                {
                    row.Add(SD.Months[item.Month]);
                }
                if (show[2].Item1)
                {
                    row.Add(item.Year.ToString());
                }
                if (show[3].Item1)
                {
                    row.Add(item.CallingPlanId);
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <Employee> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.employee[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.Name);
                }
                if (show[3].Item1)
                {
                    row.Add(item.Email);
                }
                if (show[1].Item1)
                {
                    row.Add(item.CostCenter.ToString());
                }
                if (show[4].Item1)
                {
                    row.Add(item.Extension);
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #9
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <CallingPlan> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.callingPlan[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.CallingPlanId);
                }
                if (show[1].Item1)
                {
                    row.Add(item.Minutes.ToString());
                }
                if (show[2].Item1)
                {
                    row.Add(item.Cost.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
Example #10
0
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <UserExceededDataPlan> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < mask.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.userExceededDataPlan[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();

                if (show[0].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[1].Item1)
                {
                    row.Add(item.EmployeeName);
                }
                if (show[2].Item1)
                {
                    row.Add(item.DataPlanId);
                }
                if (show[3].Item1)
                {
                    row.Add(item.CC);
                }
                if (show[4].Item1)
                {
                    row.Add(item.CostCenter);
                }
                if (show[5].Item1)
                {
                    row.Add(SD.Months[item.Month]);
                }
                if (show[6].Item1)
                {
                    row.Add(item.Year.ToString());
                }
                if (show[7].Item1)
                {
                    row.Add(item.DataExceeded.ToString());
                }
                if (show[9].Item1)
                {
                    row.Add(item.PerCent.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <InternationalMobilePhoneCall> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.internationalCalls[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[1].Item1)
                {
                    row.Add(item.EmployeeName);
                }
                if (show[3].Item1)
                {
                    row.Add(item.CostCenterCode);
                }
                if (show[2].Item1)
                {
                    row.Add(item.CostCenterName);
                }
                if (show[4].Item1)
                {
                    row.Add(item.Addresse);
                }
                if (show[5].Item1)
                {
                    row.Add(SD.Months[item.Month]);
                }
                if (show[6].Item1)
                {
                    row.Add(item.Year.ToString());
                }
                if (show[7].Item1)
                {
                    row.Add(item.Expense.ToString());
                }
                if (show[9].Item1)
                {
                    row.Add(item.PerCent.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
        public string CSVStringConstructorGeneral(Tuple <bool, string>[] show, bool[] mask, List <CostCenterMobilePhoneGeneralExpenses> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.costCenterMPGeneralExpenses[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.EmployeeName);
                }
                if (show[1].Item1)
                {
                    row.Add(item.PhoneNumber);
                }
                if (show[2].Item1)
                {
                    row.Add(item.CostCenterCode);
                }
                if (show[3].Item1)
                {
                    row.Add(item.CostCenterName);
                }
                if (show[4].Item1)
                {
                    row.Add(item.CallingPlanId.ToString());
                }
                if (show[5].Item1)
                {
                    row.Add(item.Minutes.ToString());
                }
                if (show[7].Item1)
                {
                    row.Add(item.SMS.ToString());
                }
                if (show[9].Item1)
                {
                    row.Add(item.Gprs.ToString());
                }
                if (show[11].Item1)
                {
                    row.Add(SD.Months[item.Month]);
                }
                if (show[12].Item1)
                {
                    row.Add(item.Year.ToString());
                }
                if (show[13].Item1)
                {
                    row.Add(item.Total.ToString());
                }

                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }
        public string CSVStringConstructor(Tuple <bool, string>[] show, bool[] mask, List <CostCenterMobilePhoneExpense> data)
        {
            List <string> headers = new List <string>();

            int t = 0;

            for (int j = 0; j < show.Length; j++)
            {
                if (mask[j])
                {
                    headers.Add(SD.costCenterMPExpenses[j]);
                }
            }

            List <List <string> > datas = new List <List <string> >();

            foreach (var item in data)
            {
                List <string> row = new List <string>();
                if (show[0].Item1)
                {
                    row.Add(item.CostCenterCode);
                }
                if (show[1].Item1)
                {
                    row.Add(item.CostCenterName);
                }
                if (show[2].Item1)
                {
                    row.Add(item.Calls.ToString());
                }
                if (show[4].Item1)
                {
                    row.Add(item.SMS.ToString());
                }
                if (show[6].Item1)
                {
                    row.Add(item.GPRS.ToString());
                }
                if (show[12].Item1)
                {
                    row.Add(SD.Months[item.Month]);
                }
                if (show[13].Item1)
                {
                    row.Add(item.Year.ToString());
                }
                if (show[8].Item1)
                {
                    row.Add(item.Total.ToString());
                }
                if (show[10].Item1)
                {
                    row.Add(item.Percent.ToString());
                }
                datas.Add(row);
            }

            string csv = SD.csvString(headers, datas);

            return(csv);
        }