I need to retrieve all Ids from two columns, which doesnt contain some other list.
For example:
If I have a variable:
I need to select List of rows in All notifications by DeliveryTypeId and NotificationGroupId where those IDs not contained in pair combination in selected notifications.
var selectedNotifications = _dbContext.UserNotificationTypeDeliveryChoice.Include(m => m.NotificationGroup)
.Include(m => m.DeliveryType)
.Where(m => m.UserDefId == userDefId && m.UserTypeId == (int)userType)
.Select(m => new NotificationGroup()
{
NotificationGroupId = m.NotificationGroup.NotificationGroupId,
Name = m.NotificationGroup.Name,
DefaultDeliveryType = new DeliveryType()
{
DeliveryTypeId = m.DeliveryType.DeliveryTypeId,
Name = m.DeliveryType.Name,
HasChoosen = true
}
}).ToList();
var selectedNotificationsMatchingIds = selectedNotifications.Select(n => new { n.NotificationGroupId, n.DefaultDeliveryType.DeliveryTypeId }).ToList();
and I need a condition witch will take all rows from db where is !contains.
example:
//NotificationGroup Codelist
+---------------------+-------------+-----------------------+
| NotificationGroupId | Name | DefaultDeliveryTypeId |
+=====================+=============+=======================+
| 1 | Comments | 1 |
+---------------------+-------------+-----------------------+
| 2 | QA | 1 |
+---------------------+-------------+-----------------------+
| 3 | Services | 1 |
+---------------------+-------------+-----------------------+
| 4 | eScheduling | 1 |
+---------------------+-------------+-----------------------+
| 5 | eDelivery | 2 |
+---------------------+-------------+-----------------------+
//Delivery Type Codelist
+----------------+-----------------+
| DeliveryTypeId | Name |
+================+=================+
| 1 | SMS |
+----------------+-----------------+
| 2 | Email |
+----------------+-----------------+
| 3 | PortalMessaging |
+----------------+-----------------+
//SELECTED NOTIFICATIONS
+--------------------------------------+-----------+----------------------------+---------------------+----------------+------------+
| UserNotificationTypeDeliveryChoiceId | UserDefID | UserCompanyOrInstitutionId | NotificationGroupId | DeliveryTypeId | UserTypeId |
+======================================+===========+============================+=====================+================+============+
| 269 | 2933 | NULL | 1 | 2 | 1 |
+--------------------------------------+-----------+----------------------------+---------------------+----------------+------------+
| 270 | 2933 | NULL | 2 | 2 | 1 |
+--------------------------------------+-----------+----------------------------+---------------------+----------------+------------+
| 271 | 2933 | NULL | 3 | 2 | 1 |
+--------------------------------------+-----------+----------------------------+---------------------+----------------+------------+
| 272 | 2933 | NULL | 4 | 2 | 1 |
+--------------------------------------+-----------+----------------------------+---------------------+----------------+------------+
| 273 | 2933 | NULL | 4 | 1 | 1 |
+--------------------------------------+-----------+----------------------------+---------------------+----------------+------------+
//ALL NOTIIFICATIONS
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| NotificationGroupUserTypeId | NotificationGroupChangeTypeId | UserTypeId | NotificationGroupId | NotificationTemplateId | DateCreated | DeliveryTypeId |
+=============================+===============================+============+=====================+========================+=========================+================+
| 1 | NULL | 1 | 1 | 14 | NULL | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 6 | 11 | 1 | 4 | 21 | 2011-07-18 11:13:23.543 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 17 | NULL | 1 | 4 | 6 | NULL | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 26 | NULL | 1 | 3 | 8 | NULL | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 30 | 11 | 1 | 4 | 15 | 2011-07-17 13:16:36.897 | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 31 | 14 | 1 | 4 | 16 | 2011-07-17 13:17:00.880 | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 32 | 15 | 1 | 4 | 17 | 2011-07-17 13:17:18.220 | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 33 | 16 | 1 | 4 | 18 | 2011-07-17 13:17:34.833 | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 34 | 17 | 1 | 4 | 19 | 2011-07-17 13:17:58.337 | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 35 | 18 | 1 | 4 | 20 | 2011-07-17 13:18:35.960 | 1 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 36 | 14 | 1 | 4 | 22 | 2011-07-18 16:00:27.320 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 37 | 15 | 1 | 4 | 23 | 2011-07-18 16:01:17.843 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 38 | 16 | 1 | 4 | 24 | 2011-07-18 16:01:36.300 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 39 | 17 | 1 | 4 | 25 | 2011-07-18 16:01:55.923 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 40 | 18 | 1 | 4 | 26 | 2011-07-18 16:02:12.607 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 41 | 8 | 1 | 3 | 27 | 2011-11-09 12:59:51.307 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 44 | 19 | 1 | 3 | 28 | 2011-12-21 14:57:31.780 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 48 | 20 | 1 | 5 | 29 | 2011-12-23 10:19:16.840 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
| 49 | 1 | 1 | 3 | 6 | 2011-12-22 16:09:15.047 | 2 |
+-----------------------------+-------------------------------+------------+---------------------+------------------------+-------------------------+----------------+
So I am getting in selectedNotifications correct pairs, but then when I try to filter my new query, I m getting only two pairs but I should get it (with these example):
var notSelectedNotifications = _dbContext.NotificationGroupUserType.Include(m => m.DeliveryType)
.Include(m => m.NotificationGroup)
.Where(m => m.UserTypeId == (int)userType)
.Where(m => !selectedNotificationsMatchingIds.Contains(new { m.NotificationGroup.NotificationGroupId, m.DeliveryType.DeliveryTypeId }))
.Select(m => new NotificationGroup()
{
NotificationGroupId = m.NotificationGroupId,
Name = m.NotificationGroup.Name,
DefaultDeliveryType = new DeliveryType()
{
DeliveryTypeId = m.DeliveryType.DeliveryTypeId,
Name = m.DeliveryType.Name,
HasChoosen = false
}
}).ToList();
Any advise is welcomed. If someone can tell me, how to get all of these which is not selected in selectedNotificationsMatchingIds
The Contains() method usage default equality comparer when implementation of IEqualityComparer<T> is not provided for element stored in collection. Obviously the default equality comparer will not work for element of Anonymous class stored in selectedNotificationsMatchingIds.
You have two options:
Option 1: Re-write Where condition to use Any as:
//.Where(m => !selectedNotificationsMatchingIds
// .Contains(new { m.NotificationGroup.NotificationGroupId,
// m.DeliveryType.DeliveryTypeId }))
.Where(m => !selectedNotificationsMatchingIds
.Any(c => c.NotificationGroup.NotificationGroupId == m.NotificationGroupId
&& c.DeliveryTypeId == m.DeliveryType.DeliveryTypeId))
Option 2: Create a class having properties for NotificationGroupId and DeliveryTypeId and implement IEqualityComparer<T> interface for it. Then only you can use object of that class as part of .Contains() method.
I'm using sqlite, I've setup three tables.
Table for list of skills this can be expand.
+----+----------+
| ID | Skills |
+----+----------+
| 1 | Swimming |
| 2 | Running |
| 3 | Boxing |
| 4 | Dancing |
| 5 | Singing |
+----+----------+
Table for availability of each person. 0 represents the person is not available.
+-------+-----+-----+-----+-----+-----+-----+-----+
| Names | SUN | MON | TUE | WED | THU | FRI | SAT |
+-------+-----+-----+-----+-----+-----+-----+-----+
| Mark | 0 | 1 | 1 | 1 | 1 | 1 | 0 | (MON-FRI)
| Robin | 0 | 1 | 1 | 1 | 1 | 1 | 0 | (MON-FRI)
| James | 0 | 0 | 1 | 1 | 1 | 1 | 1 | (TUE-SAT)
+-------+-----+-----+-----+-----+-----+-----+-----+
Table for each person skill possess. 1/0 is a boolean value.
+-------+----------+---------+--------+---------+---------+
| Names | Swimming | Running | Boxing | Dancing | Singing |
+-------+----------+---------+--------+---------+---------+
| Mark | 1 | 1 | 1 | 1 | 1 |
| Robin | 1 | 1 | 1 | 1 | 1 |
| James | 1 | 1 | 1 | 1 | 0 |
+-------+----------+---------+--------+---------+---------+
By using the tables above how could I achieved this result to sum each person's availability base on their skill.
Expected Results:
+----------+-----+-----+-----+-----+-----+-----+-----+
| Skills | SUN | MON | TUE | WED | THU | FRI | SAT |
+----------+-----+-----+-----+-----+-----+-----+-----+
| Swimming | 0 | 2 | 3 | 3 | 3 | 3 | 1 |
| Running | 0 | 2 | 3 | 3 | 3 | 3 | 1 |
| Boxing | 0 | 2 | 3 | 3 | 3 | 3 | 1 |
| Dancing | 0 | 2 | 3 | 3 | 3 | 3 | 1 |
| Singing | 0 | 2 | 3 | 3 | 3 | 3 | 0 |
+----------+-----+-----+-----+-----+-----+-----+-----+
How to achieved the same result in sqlite?
In excel I have this which count the headcount base on assigned letter code per day:
Here's my excel formula: =SUMIF(G$2:G$5,E9,$E$2:$E$5)
In my Sqlite database I have 3 tables:
TABLE 1
+----------------+---------------+--------+
| ID | status_name | status_code | status |
+----+-------------+-------------+--------+
| 1 | Available | A | true |
+------------------+-------------+--------+
| 2 | HalfDay | H | true |
+------------------+-------------+--------+
| 3 | On Leave | OL | true |
+------------------+-------------+--------+
| 4 | Restday | R | true |
+------------------+-------------+--------+
| 5 | Vacation | V | true |
+------------------+-------------+--------+
TABLE 2
+--------------+-------+-------+------+----------+
| EmployeeName | Site | Shift | Team | JobTitle |
+--------------+-------+-------+------+----------+
| Steve | Bldg1 | Night | N1 | Doctor |
+--------------+-------+-------+------+----------+
| Dave | Bldg1 | Night | N2 | Nurse |
+--------------+-------+-------+------+----------+
| Jack | Bldg1 | Night | N2 | Nurse |
+--------------+-------+-------+------+----------+
| Jacob | Bldg2 | Day | D1 | Doctor |
+--------------+-------+-------+------+----------+
| Noah | Bldg2 | Day | D2 | Nurse |
+--------------+-------+-------+------+----------+
| MAX | Bldg2 | Day | D2 | Nurse |
+--------------+-------+-------+------+----------+
TABLE 3
+----------+-------+-------+------+-----+-----+-----+-----+-----+-----+-----+
| JobsType | Site | Shift | Team | SUN | MON | TUE | WED | THU | FRI | SAT |
+----------+-------+-------+------+-----+-----+-----+-----+-----+-----+-----+
| Doctor | Bldg1 | Night | N1 | A | H | A | A | OL | A | A |
+----------+-------+-------+------+-----+-----+-----+-----+-----+-----+-----+
| Nurse | Bldg1 | Night | N2 | A | H | H | A | A | A | A |
+----------+-------+-------+------+-----+-----+-----+-----+-----+-----+-----+
| Doctor | Bldg2 | Day | D1 | H | A | H | H | A | A | OL |
+----------+-------+-------+------+-----+-----+-----+-----+-----+-----+-----+
| Nurse | Bldg1 | Night | N2 | A | H | H | A | A | A | A |
+----------+-------+-------+------+-----+-----+-----+-----+-----+-----+-----+
By using the 3 tables above how could I achieved this result in query?
+--------------+-----+-----+-----+-----+-----+-----+-----+
| STATUS TYPES | SUN | MON | TUE | WED | THU | FRI | SAT |
+--------------+-----+-----+-----+-----+-----+-----+-----+
| Available | 5 | 4 | 4 | 5 | 5 | 6 | 5 |
+--------------+-----+-----+-----+-----+-----+-----+-----+
| HalfDay | 1 | 5 | 5 | 1 | 0 | 0 | 0 |
+--------------+-----+-----+-----+-----+-----+-----+-----+
| On Leave | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
+--------------+-----+-----+-----+-----+-----+-----+-----+
| Restday | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+--------------+-----+-----+-----+-----+-----+-----+-----+
| Vacation | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+--------------+-----+-----+-----+-----+-----+-----+-----+
So far I've come this;
SELECT DISTINCT M.status_name, M.status_code, A.SUN, count(*),count(*) FROM TABLE3 M LEFT join TABLE2 A ON M.status_code= A.SUN LEFT join TABLE2 B ON (A.Team = B.Team AND A.Shift = B.Shift AND A.Site = B.Site)
WHERE M.product_status = 1
GROUP BY M.status_name;
First step, generate a test database (With a couple of helpful indexes):
CREATE TABLE status(id INTEGER PRIMARY KEY, status_name TEXT, status_code TEXT, status TEXT);
INSERT INTO status VALUES(1,'Available','A','true');
INSERT INTO status VALUES(2,'HalfDay','H','true');
INSERT INTO status VALUES(3,'On Leave','OL','true');
INSERT INTO status VALUES(4,'Restday','R','true');
INSERT INTO status VALUES(5,'Vacation','V','true');
CREATE TABLE employees(EmployeeName TEXT, Site TEXT, Shift TEXT, Team TEXT, JobTitle TEXT);
INSERT INTO employees VALUES('Steve','Bldg1','Night','N1','Doctor');
INSERT INTO employees VALUES('Dave','Bldg1','Night','N2','Nurse');
INSERT INTO employees VALUES('Jack','Bldg1','Night','N2','Nurse');
INSERT INTO employees VALUES('Jacob','Bldg2','Day','D1','Doctor');
INSERT INTO employees VALUES('Noah','Bldg2','Day','D2','Nurse');
INSERT INTO employees VALUES('MAX','Bldg2','Day','D2','Nurse');
CREATE TABLE schedule(JobsType TEXT, Site TEXT, Shift TEXT, Team TEXT, SUN TEXT, MON TEXT, TUE TEXT, WED TEXT, THU TEXT, FRI TEXT, SAT TEXT);
INSERT INTO schedule VALUES('Doctor','Bldg1','Night','N1','A','H','A','A','OL','A','A');
INSERT INTO schedule VALUES('Nurse','Bldg1','Night','N2','A','H','H','A','A','A','A');
INSERT INTO schedule VALUES('Doctor','Bldg2','Day','D1','H','A','H','H','A','A','OL');
INSERT INTO schedule VALUES('Nurse','Bldg1','Night','N2','A','H','H','A','A','A','A');
CREATE INDEX employees_idx ON employees(JobTitle, Site, Shift, Team);
CREATE INDEX status_idx_code ON status(status_code);
This query:
SELECT st.status_name, st.status_code
, sum(sc.SUN = st.status_code) AS SUN
, sum(sc.MON = st.status_code) AS MON
, sum(sc.TUE = st.status_code) AS TUE
, sum(sc.WED = st.status_code) AS WED
, sum(sc.THU = st.status_code) AS THU
, sum(sc.FRI = st.status_code) AS FRI
, sum(sc.SAT = st.status_code) AS SAT
FROM status AS st
JOIN schedule AS sc ON st.status_code IN (sc.SUN, sc.MON, sc.TUE, sc.WED
, sc.THU, sc.FRI, sc.SAT)
JOIN employees AS e ON sc.JobsType = e.JobTitle AND sc.Site = e.Site
AND sc.Shift = e.Shift AND sc.Team = e.Team
GROUP BY st.status_name, st.status_code
ORDER BY st.status_name, st.status_code;
will produce
status_name status_code SUN MON TUE WED THU FRI SAT
----------- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
Available A 5 1 1 5 5 6 5
HalfDay H 1 5 5 1 0 0 0
On Leave OL 0 0 0 0 1 0 1
How it works:
For each row in the status table, join each row in the schedule table that has that status for at least one day, and then join all rows from the employee table that match each schedule row's type of job (With this sample data, that results in a total of 14 rows being generated). Then group all the rows on the status, and for each day, add up the number of rows in that group where the schedule code for that day matches the status.
I have a table which is called Signer :
+--------------+----------+---------+--------+--------------+---------+-----------+
| Name | User | Order | Signed | CompanyName | Status | InvoiceId |
+--------------+----------+---------+--------+--------------+---------+-----------+
| Anders | aa | 1 | 0 | OvnAnd2 | 0 | 26650 |
| Peyman | pm | 2 | 1 | OvnAnd2 | 1 | 26650 |
| Siw Ericsson | se | 3 | 0 | OvnAnd2 | 0 | 26650 |
| test | test | 4 | 0 | OvnAnd2 | 0 | 26650 |
|Siw Ericsson | se | 1 | 0 | OvnAnd2 | 0 | 26652 |
| test | test | 2 | 1 | OvnAnd2 | 0 | 26652 |
|Siw Ericsson | se | 1 | 0 | OvnAnd2 | 0 | 25365 |
+--------------+----------+---------+--------+--------------+---------+-----------+
Goal:
As you can see I have 3 different InvoiceId's. For each InvoiceId, I would like to find a row with minimum order number that Status column's value is 0 and User column has to be se.
( It means, Show the current users related invoices which are ready to be signed based on his/her username, order, signed columns)
I came up with this T-SQL which works fine :
select * from Signer s1
where s1.User = 'se' and Order = (select min(Order) from Signer s2 where s2.InvoiceId = s1.InvoiceId and Signed = 0)
And the result:
+--------------+----------+---------+--------+--------------+---------+-----------+
| Name | User | Order | Signed | CompanyName | Status | InvoiceId |
+--------------+----------+---------+--------+--------------+---------+-----------+
|Siw Ericsson | se | 1 | 0 | OvnAnd2 | 0 | 26652 |
|Siw Ericsson | se | 1 | 0 | OvnAnd2 | 0 | 25365 |
+--------------+----------+---------+--------+--------------+---------+-----------+
I would like to convert this query from T-Sql to Linq or EntityFramework :
This is my solution:
var temp = from x in db.Signers
where x.User == Me.UserName &&
x.Signed == 0
group x by x.InvoiceId
into item
select new
{
item.Key,
item = item.Min(x => x.Order)
};
Which returns 3 rows which is wrong because Siw should see the related invoices that are ready to be signed by her. (It means the first row should not be in the list)
+--------------+----------+---------+--------+--------------+---------+-----------+
| Name | User | Order | Signed | CompanyName | Status | InvoiceId |
+--------------+----------+---------+--------+--------------+---------+-----------+
| Anders | aa | 1 | 0 | OvnAnd2 | 0 | 26650 |
|Siw Ericsson | se | 1 | 0 | OvnAnd2 | 0 | 26652 |
|Siw Ericsson | se | 1 | 0 | OvnAnd2 | 0 | 25365 |
+--------------+----------+---------+--------+--------------+---------+-----------+
More info:
- As you can see in the first table, we have a special logic that someone can sign invoices out of order and Peyman is one of them.
- I don't want to use SqlQuery() method in Entityframework in order to execute t-sql queries.
I appreciate any help to find a solution for my goal.
Best regards
I think this is one of those situations where "let" come in handy:
var result = from s in Signers
let minToSign = Signers.Where(si =>
si.InvoiceId == s.InvoiceId && si.Signed == 0
).Min(si => si.Order)
where s.User == "se" && s.Order == minToSign
select s;
I am trying to figure out how to join two respective datarows into single datarow in dataset through Department column Name.
In provided dataset output i want to join Gastroenterology and Medical Gastroen(two datrows) through column name to single datarow (similar to Required Final dataset Output with Merged Rows).
Need Your ideas/help how it can be accomplished in asp.net and/or C#.
DataSet Output
Department Male Visit Female Visit Total Count
---------- ---------- ------------ -----------
Endocrinology 10 20 30
Gastroenterology 15 25 40
General Medicine 25 05 30
Medical Gastroen 30 20 50
Required Final Dataset Output with Merged Rows
Department Male Visit Female Visit Total Count
---------- ---------- ------------ -----------
Endocrinology 10 20 30
Gastroenterology 45 45 90
General Medicine 25 05 30
I think you must use joining for this in your database query. that would be better.
Table A
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
Table B.
+-----+---------------------+-------------+--------+
| OID | DATE | ID | AMOUNT |
+-----+---------------------+-------------+--------+
| 102 | 2009-10-08 00:00:00 | 3 | 3000 |
| 100 | 2009-10-08 00:00:00 | 3 | 1500 |
| 101 | 2009-11-20 00:00:00 | 2 | 1560 |
| 103 | 2008-05-20 00:00:00 | 4 | 2060 |
+-----+---------------------+-------------+--------+
SQL QUERY
SQL> SELECT ID, NAME, AMOUNT, DATE
FROM CUSTOMERS
INNER JOIN ORDERS
ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID;
Resulted Table:
+----+----------+--------+---------------------+
| ID | NAME | AMOUNT | DATE |
+----+----------+--------+---------------------+
| 3 | kaushik | 3000 | 2009-10-08 00:00:00 |
| 3 | kaushik | 1500 | 2009-10-08 00:00:00 |
| 2 | Khilan | 1560 | 2009-11-20 00:00:00 |
| 4 | Chaitali | 2060 | 2008-05-20 00:00:00 |
+----+----------+--------+---------------------+
I hope it will help you.
You can Do something like this.
DataTable _dataTable = new DataTable();
DataRow _dataRow1 = null;
_dataTable.TableName = "Products";
_dataTable.Columns.Add("ID",typeof(int));
_dataTable.Columns[0].AutoIncrementSeed = 1;
_dataTable.Columns[0].AutoIncrement = true;
_dataTable.Columns.Add("ProductsName");
_dataTable.Columns.Add("Price");
_dataRow1 = _dataTable.NewRow();
_dataRow1["ProductsName"] = "Sony Laptop";
_dataRow1["Price"] = "15000";
_dataTable.Rows.Add(_dataRow1);
DataRow _dataRow2 = null;
_dataRow2 = _dataTable.NewRow();
_dataTable.Rows.Add(_dataRow2);
_dataRow2["ProductsName"] = "LG Laptop";
_dataRow2["Price"] = "15000";
DataSet _dataSet = new DataSet();
_dataSet.Tables.Add(_dataTable);