Operator '==' incompatible with operand types 'ProductType' and 'String' ProductType is my Enum, and String is my input type. I don't seem to be able to convert one to the other.
I was looking at the options in Intellisense for the properties used with a parameter for the Object Data Source. There is one that I don't understand how it would be used. explain, or recommend an article, about the DB Type is for and how it would be used?
I have a gridview and I have an edit template for one control. I have a drop down box in this edit template so that you can select a value from it and then when you hit 'Update' the value from the drop down box is committed to the updated record. Unfortunately when I do hit the update button I get a fault that the "Status" field cannot be null.
Here is the code that picks the value from the drop down value and assigns it to the new values list:
I have an insert that uses an object data source with out the direction property set and it works fine. I noticed the direction property though and wondered if I should use it.Should the direction property for the parameters of an object data source be used with a simple CRUD operations?
my query is SELECT a.HD, a.HEAD, a.SH, a.SUBHEAD, a.TRK, a.TRACK, a.TGT, a.TARGET, a.PDC, a.DT_RELEASE, a.STATUS, a.CO FROM V_HIERARCHY1 a
my data is ,HR HR Rec Records Leave Leave Records HRL.0001 Policy and Process for leave record. 27.06.2010 30.06.2010 WIP Edlink HR HR Rec Records Leave Leave Records HRL.0002 Quarterly Review 01.07.2010 04.07.2010 Planned Edlink HR HR DB Database SAL Salary DDS.0001 Calculation of Monthly salary 08.08.2010 09.08.2010 WIP Edlink HR HR Rec Records Ind Induction Records HRI.0001 Completion of dossiers. 08.07.2010 10.07.2010 WIP Edlink HR HR DB Database Emp Employee HDE.0001 Offer letter 06.07.2010 09.07.2010 WIP Edlink
I'm exploring ASP.net. I have created a FormView based on Linq Data Sources. There are several fields in my datasource that are either future or archaic.
1) Do all fields in the DataSource need to have a control in the FormView? 2) Does ASP.net need to insert/update all fields in the DataSource?
I'm using LINQ to SQL to grab information from my SQL database. I have a GridView which shows all the top level information - in this case a list of groups (i.e. admin, users and so on). When a user clicks say the admin group, I want to be able to show each member in that group. I have the following code which grabs the information from the database:
[code]....
I know that I can use GridView again to display the results of the query, but this doesn't really look nice as it shows too much information at once. How would I go about having some sort of display which will show just one user at a time, giving me the chance to click next and back?
I do not even know where to begin when it comes to this I am continuing from this question: ttp://stackoverflow.com/questions/2664029/linq-to-sql-statement-issueWhere I searched multiple columns in a table and returned my values in a datagrid,Ive done basic formatting on the grid but am unable to decipher how I would go aboutgetting each row to link to another page?
using (TiamoDataContext context = new TiamoDataContext()) { var search = from p in context.UserProfile1s
I want to add a search engine to my website. I want it to handler boolean searches and give me a list of results in order or best match. I need it to be able to work with LINQ, because I want to add additional where clauses to the final query that gets run. I am looking for the best open source .NET search engine that works with LINQ. I like lucene.net but the problem is the LINQ interface (LINQ to Lucene) hasn't been updated since 2008. Are there any good options out there?
I am working on LINQ. I am calling a SQL Stored Procedure with 2-3 parameters it's working fine. When i am going to call Stored Procedure with 8 to 9 parameters the auto generated column is not comming automatically. So i am unable to use LINQ with Stored Procedure with multiple parameters.
I am going to return an Object depending on the Class and Year params. I want to remove the where condition when the Class and Year parames are null or zero.
public void SomeFunction(string searchField) { var data = from a in dx.SomeTable where [code]...
Now if I had to use the value of the parameter "searchField" as the property to be selected in the where clause then how do I do it ?
i.e I want to assign the value of the parameter "searchField" to the property I am checking in the where clause.
So ... the value of "SomeProperty" in a.SomeProperty must be the value of "searchField". How to do this ?
PS : I dont want a.SomeProperty=searchField. What I want is "SomeProperty" itself to be replaced by the value of "searchField" and then , this has to be checked to see if its equal to 270.
I've got a Linq datasource hitched up to a Formview control for clients to edit some data. I'm having trouble setting the where parameters withing the control so it show the right set of data. Here's the markup:
[Code]....
Upon running right now, it's completely ignoring the where parameters. What am I missing here?
im new to linq and im having lots of trouble creating complex queries.. My problem mainly is that i am using Linq as a BLL.
i created a dbml (with namespace called DAL) file with 2 tables with a one to many relation. Pop and City. There is a forgien key in pop that points to a city. I also created a class called Pop that inhertis DAL.Pop. Now in my ASPX page, i want to call a function in the Pop class that would retrieve some Pop according to its ID, but i need the city name as well.. Ive been going around this in circles for days. I dont know how to write the Linq syntax and i dont understandd how my function's signature should be like.. I want to recieve a table that i can bind to a Gridview and preferable, specify which coloumns to bind.
how the Lambda expression work specially in case of parameters (in the above case a & b) ? What is the basic concept of parameters in Lambda expression ? Can we use the names of the variables defined outside of the query instead of a & b ? which elements a & b represent in the above case represent ? Can we pass parameters from outside in the query ? If we can pass parameters from outside query then how it will be done? If you give me any other example instead of the above query to understand the concept of parameter in Lambda expression.
I have a data object named Usertype. The Database table is also called Usertype. I need to have an enum representing Usertypes also. What would proper naming convention be for the Usertype Enum? It can't be Usertype. But I can't append an E or "Enum" to it anywhere. What would be the proper name for the Enum?
I have an application which has rows of data in a relation database the table needs a status which will always be either Not Submitted, Awaiting Approval, Approved, Rejected Now since these will never change I was trying to decide the best way to implement them I can either think of a Status enum with the values and an int assigned where the int is placed into the status column on the table row.
Or a status table that linked to the table and the user select one of these as the current status.
I can't decide which is the better option as I currently have a enum in place with these values for the approval pages to populate the dropdown etc and setup the sql (as it currently using to Approved and submitted for approval but this is dirty for various reasons and needs changed).
Wondering what your thought on this were and whether I should go for one or the other.
If it makes any difference I am using Entity framework.