Click here to Skip to main content
16,021,041 members

Comments by Mukesh Bhagat (Top 6 by date)

Mukesh Bhagat 20-Jan-15 7:24am View    
Thx OriginalGriff...

I had already read your link..but doesn't find solution.
I have to find out how many columns(VendorMaster table) are used in all stored procedure inside database.
Mukesh Bhagat 19-Aug-14 7:03am View    
I want to filter report viewer after display result set table . I want filter like excel sheet after result appear in report viewer.
Mukesh Bhagat 3-Dec-13 10:23am View    
It is type of guid data type of property id.
Mukesh Bhagat 3-Dec-13 9:12am View    
Hello phil.o,

Here is my complete method i want to get record from below method.

public DataTable getSalesByProperty(Guid propertyId)
{
try
{
DataTable dt = new DataTable();
DataColumn dc = new DataColumn();
dc.AutoIncrement = true;
dt.Columns.Add("salesId", typeof(Guid));
dt.Columns.Add("PropertyName", typeof(string));
dt.Columns.Add("ClientName", typeof(string));
dt.Columns.Add("MovedInDate", typeof(DateTime));
dt.Columns.Add("LeaseAmt", typeof(decimal));
dt.Columns.Add("CommissionPrcnt", typeof(decimal));
dt.Columns.Add("ComissionDlr", typeof(decimal));
var sls = (from s in tde.Sales
join p in tde.Properties on s.PropertyId equals p.PropertyId
where s.IsActive == true
&& (propertyId == Guid.Empty || s.PropertyId == propertyId)
select new
{
salesId = s.SaleId,
PropertyName = p.Name,
ClientName = s.Tenant1FirstName + " " + s.Tenant1LastName + " " + s.Tenant2FirstName + " " + s.Tenant2LastName + " " + s.Tenant3FirstName + " " + s.Tenant3LastName + " " + s.Tenant4FirstName + " " + s.Tenant4LastName,
MovedInDate = (DateTime?)s.DateTenantMovedIn ?? DateTime.Now,
LeaseAmt = s.LeaseAmt,
CommissionPrcnt = (decimal?)s.Commssion ?? 0,
ComissionDlr = (decimal?)s.FlatFee ?? 0
}).ToList();
sls.ToList().ForEach((n) =>
{
DataRow row = dt.NewRow();
row.SetField<guid>("salesId", n.salesId);
row.SetField<string>("PropertyName", n.PropertyName);
row.SetField<string>("ClientName", n.ClientName);
row.SetField<datetime>("MovedInDate", n.MovedInDate);
row.SetField<decimal>("LeaseAmt", n.LeaseAmt);
row.SetField<decimal>("CommissionPrcnt", n.CommissionPrcnt);
row.SetField<decimal>("ComissionDlr", n.ComissionDlr);
dt.Rows.Add(row);
});
return dt;
}
catch (Exception ex)
{
throw ex;
}

}

it does not accept null values into guid.empty property.

error like -
Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Pls try to resolve.
Thanks
Mukesh Bhagat 18-Sep-13 9:08am View    
<add name="treEntities" connectionstring="metadata=metadata=res://*/App_Code.treModel.csdl|res://*/App_Code.treModel.ssdl|res://*/App_Code.treModel.msl; provider=System.Data.SqlClient;provider connection string='Data Source=localhost; Initial Catalog=Tre;Integrated Security=True;Connection Timeout=60; multipleactiveresultsets=true'" providername="System.Data.EntityClient">