Restaurant App in MVC C# Part 1
Вставка
- Опубліковано 14 жов 2024
- Don't forget to Like, Comment, Share, and Subscribe to my Channel
Project: github.com/tek...
🧛♂️ Connect with me on
LinkedIn -www.linkedin.com/in/tek-tuition
Telegram:t.me/Tektuition
Skype: tektuition@gmail.com
seen best tutors reg MVC in their own way, But teaching the concept via PRACTICAL EXAMPLE like this developing an app is giving so much hands on exp and your standing top among all MVC tutors sir. I really like this example and looking forward to many practical examples like this down the line.
Thank you very much sir, especially for not asking to anyone to be a member to get the source code. Very good tutorial for people like me who are new to programming in C#.
I just wanted to thank you for Creating this Video. I have been looking for this and tried following other videos for months already. Good I was able to see yours because I like the way you explain different concepts. Keep it up! Liked and Subscribed
By the way do you have any edit tutorials for forms like this?
Super flow showing and very detail way
thanks a lot for this video , and your method of teaching each and everything is very helpful .
it is very helpful
very good content
I've been looking for content like this for a long time and I found it here.
I was able to create a simple project and improve a lot.
You are doing good. More promotions. New content.
I'm cheering for you
Awesome job sir ....Subscribed.. 👍
I like how calm you are
Hello sir thank you for this tutorial it happens to be my sem project at campus but I have an issue, the code for getting the final total, when I run the program with chrome, instead of adding the listed totals it brings NaN in that area of the final total, May you please help me explain why?
Kilogram may calculate and given the result in unit price for ex- 1kg apple =50 then 2kg apple =100 like this sir
One of the best tutor in India 🎉
This is a great tutorial. You should keep it up.
Wowwww thank you so much sir this has been really helpful
Good video tutorial MVC
Thank you so much
very very very nice sir ...................................awesommmmmmmmmmmmmm
so far the best video for MVC and a hell of lot about jquery. Thank you
Yes if you will not use the every request will go to server...and page ref also happen
can this b done in visual studio sir??
This is wonderful tutorial. Can we have the complete source code of above ?
Thanks. It was Very useful as I am doing first .Net project.
But My "Add To List " button is not working. if I click on it, don't show the listed Items. i have checked id selector & function many times but couldn't found what us wrong. Can you help me please please?
Hello sir, Thanks for this sharing these knowledge to us, it really will help to understand the concepts, so sir i have a query while doing code the remove action wont work can you sent us the same code in comment for first video only this will help us to resolve the issue please support as same.
Thanks in advance
Wow... very helpful.. subscribed
Sir, even if the discount option in percentage may be discounted, then it will given the result of unit price of Calcute
Hello. I really liked this tutorial. can you upload the codes so I can download them?
This very good video..Could you please share the code of this program. That will be more helpful..Thanks in advance..
very helpful deserve more subsribers please do more videos sir keepsafe :)
Futsek mndiya🙏🙏
Sir jee very helpful video Thank you sir is project Ko PURA baba ke bataye ga
I've problem Cannot implicitly convert type 'decimal?' to 'decimal'./ I did step by step/
Very nice tutorial sir.Easy to understand for beginners. Can you please provide the source code of this project Sir?
Thank you so much, that's very clear and specific
Is this entity model or without entity model sir?
I was trying this in MVC 5, but Viewbag, @HTML all showing error. I removed temp files, installed nuget mvc5, updated appsettings and tried every means. Deleted and created the index and very moment I add @model Tuple < ...> in the index.cshtml, Viewbag statement become red and it says name does not exist in the current context. I tried downgrading the .NET framework also and no way.
Thank you very much sir. Really superb
good day sir, this is so interesting is there possibility to share the source code
thanking in advance
thanks
What an awesome tutorial Thanks!!
I like your videos and I m a fan of you. I practising according to your video, so, I could not able to bind the return value to the Unit Price text box , please help.
hello sir
I had the sime problem in the beging
Great Tutorial Sir, but can you add another tutorial to show how to print sales receipt for customers. thanks
Hi Teck.. thanks for all this free tutorial
My question is when you delete how to recalculate the sub total and the value of the deleted selected to be taken from the FinalTotal textbox thank you again...
I've problem Cannot implicitly convert type 'decimal?' to 'decimal'./ I did step by step/
It's been a few months but maybe it will help someone else if they're going through this. You might even come back to this! I've made some additions to my code but the first thing you should do it make your variable/s.
var finalTotal = parseFloat($("#txtFinalTotal").val());
and you need a variable to hold the total that is listed in your list.
Mr. Tek gave us a way to reach this variable by its id that is being passed through the btn click. Using this we could get the closest "tr" and find "td" that is equal to an index in your table.
var total = parseFloat($(itemId).closest("tr").find("td:eq(6)").text());
My index 6 equals to my total in my table. With these 2 variables you could perform subtraction
finalTotal = finalTotal - total;
Then, add your new total to your finalTotal tag.
$("#txtFinalTotal").val(finalTotal.toFixed(2));
Finally remove the tag.
$(itemId).closest('tr').remove();
Here's my Remove Function:
function RemoveItemOnClick(itemId) {
var finalTax = parseFloat($("#txtFinalTax").val());
var finalTotal = parseFloat($("#txtFinalTotal").val());
var tax = parseFloat($(itemId).closest("tr").find("td:eq(5)").text()); /* equal to index td in tr = tax */
var total = parseFloat($(itemId).closest("tr").find("td:eq(6)").text()); /* equal to index td in tr = total */
finalTax = finalTax - tax;
finalTotal = finalTotal - total;
$("#txtFinalTax").val(finalTax.toFixed(2));
$("#txtFinalTotal").val(finalTotal.toFixed(2));
$(itemId).closest('tr').remove(); /* Remove closes tr tag to itemId */
}
Haven't gotten to the next video yet >.> so maybe he has addressed this already. Anyways, hope it helps!
@@Voidsway
function FinalItemTotal() {
$("#txtFinalTotal").val("0.00");
var FinalTotal = 0.00;
$("#tblRestaurantItemList").find("td:gt(0)").each(function () {
var Total = parseFloat($(this).find("td:eq(5)").text());
FinalTotal += Total;
alert(FinalTotal);
});
$("txtFinalTotal").val(parseFloat(FinalTotal).toFixed(2));
}
canu help me in this function. Thaankyou in advance
@@sarojoc looks like you need to loop through your table rows.
Change td:gt(0) to find("tr:gt(0)").each
your txtFinalTotal is being accessed wrong at the end. You forgot the #.
$("#txtFinalTotal").val
Should work after this.
@@Voidsway Thank You .
Getting error-Named argument specifications must appear after all fixed arguments have been specified. Please use language version 7.2 or greater to allow non-trailing named arguments.
Customer :
@Html.DropDownList(name: "Customer", new SelectList(Model.Item1, dataValueField: "Value", dataTextField: "Text"),
htmlAttributes: new { @class = "form-control" })
Hello sir, Thanks for sharing this work.
Hi can you make video on crud on many to many model
where did Private ResturantDBEntities come from ? in thePayment TypeRepository
Can you share GitHub code?
In connection properties, it showed me the page with Data source and Database file name which I could not find in the system?
Sir this project can be online ordering or not
I took the displayed concept but it is not loading. In browser logs sometimes it is showing as parsefloat error.
thank you so much for uploading this tutorial sir :)
you just got my subscription
Great work, keep going..
In case someone faced the following error :
"LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression."
just replace :
//var objSelectListItems = new List();
//objSelectListItems = (from obj in objRestaurantDBEntities.Customers
// select new SelectListItem()
// {
// Text = obj.CustomerName,
// Value = obj.CustomerId.ToString(),
// Selected = true
// }).ToList();
by the following :
var objSelectListItems = objRestaurantDBEntities.Customers.ToList().Select(c => new SelectListItem
{
Value = c.CustomerId.ToString(),
Text = c.CustomerName
});
May be u are missing System.Linq namespace
@@TekTuition Hi Tek, No I'm already using the System.Linq namespace
Nice Sir
Can u help me with this error thanks in advance : System.Data.Entity.Core.EntityException: 'The underlying provider failed on Open.' SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I am getting an error on this code.
var objSelectListItems = new List();
objSelectListItems = (from obj in objRestauranDBEntities.Customers
select new SelectListItem()
{
Text = obj.CustomerName,
Value = obj.CustomerID.ToString(),
Selected = true
}).ToList();
return objSelectListItems;
it says "LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression."
Awesome bro thanks alot
best tutorial about MVC!!!
Very good Series!!
what you use between entity framework and ado.net
Entity framework code first approach
Cannot implicitly convert type 'decimal?' to 'decimal'. An explicit conversion exists (are you missing a cast?)
have you got issue solved
@@shruthin3671 decimal? unitPrice = objrestruant.Items.Single(model => model.ItemId == itemId).ItemPrice; Try this
hello sir, this is a good tutorial for mvc . great job..!!
Awesome video for learners
CS1738: Named argument specifications must appear after all fixed arguments have been specified. Please use language version 7.2 or greater to allow non-trailing named arguments. getting this error while loading page... can anyone help with me
Send us screenshots to mail..
@Shwetha Go to Manage Nuget packages and update. it will resolve your error!
@@arfeenkhan2831 I have updated the packages but didn't resolve the error. Please Help
did u resolve that error..? . i am getting the same error.
finally got it @shwetha . Go to Manage Nuget packages and update. i updated 4 packages like dotnet compiler , jquery , bootstrap it's working now.
could u tell me why my button "Remove" un work in my app ?, I had followed your step by step clearly but still does not work. just it my problem and I like your video
If it's possible to share your code to me so can check. Or tell me what are you doing?
or check in console maybe you are getting some error. or share the error
I've problem Cannot implicitly convert type 'decimal?' to 'decimal'./ I did step by step/
@@TekTuition sir please help me for adding the total in restaurant
@@apeksharahulgade5780plz share the code
Sir in payment type repository the name RestaurantDBEntities show a error message and say could not be occur
sir i am getting an error after time 22.22 that not supported exception was handled by the user.. now what i do?
What is the error
@@TekTuition NotSupportedException was unhandled by user code
Hii sir I have some isse please let me where I am wrong!
IF YOU HAVE TABLES HOW DO YOU ASSIGN THE TABLES TO A CUSTOMER
very good video suscribed
Thanks
good job sir need souce code sir
I am not able to select the unit price in that
sir, I can't clone your project. When I clone it's null.
CS1729 Select list does not contain a constructor that takes 3 arguments !!
Sir....you have a great job but while doing the listing of item at the bottom is not working .......but the code was same may I know reason
Can anyone tell me why?
only can check once will look your code. If possible please share the code.
sir i got "Object reference not set to an instance of an object." error message when execute the index.cshtml on " @Html.DropDownList("tbl_customer", new SelectList(Model.Item1, "Value", "Text"), new { @class = "from-control" })" please help me
Same error😞
@@pricillaroselin1639 did you fixed the error???
@@pricillaroselin1639 mee to
Hi sir i have a problem to store the data in AddToList
share you code & database. then only can check
Sir at the time of adding the total in to restaurant it's not working.
M getting 0.00 value
share the code
But in view there is no index file why
Sir please try to this web app create into .net core mvc using db first approach
i cannot use any function in js, i just download only bootstrap, how can i get jquery to use Javascript :(
add into layout page
very very clear and excellent one
can you please share the source code?
I've problem Cannot implicitly convert type 'decimal?' to 'decimal'./ I did step by step/
in 41.26 seconds
Your problem has solved?
@@mano5529 decimal? unitPrice = objrestruant.Items.Single(model => model.ItemId == itemId).ItemPrice; try this
would you like make same project source code with asp.net mvc and extjs 4
Hi looks good. But where can i see source code ?
Nice video...
Thanks sir for these knowledge
good day sir, I have really enjoyed your demo video, but the whole project I came across with only one issue which is the following may be you can help and tell where I went wrong. thanks.
Compiler Error Message: CS1738: Named argument specifications must appear after all fixed arguments have been specified. Please use language version 7.2 or greater to allow non-trailing named arguments.
Source Error:
Line 206:
Line 207: Customer :
Line 208: @Html.DropDownList(name: "Customer", new SelectList(Model.Item1, dataValueField: "Value", dataTextField: "Text"), htmlAttributes: new { @class = "form-control" })
Line 209:
Line 210:
Source File: C:\Mvc Work\WebAppRestaurantDemo\WebAppRestaurantDemo\Views\Home\Index.cshtml Line: 208
If it's possible please share the code then only can help. tektuition2020@gmail.com
Hii sir plz source code of this project
can you plz provide us the code in files plz
Thank you.
Sir how to connect you?
Skype tektuition@gmail.com
@@TekTuition i have an error
Plz send me full project
Codding
Codding
Very good sir..pls help to get code..
You are a legend!
I've problem Cannot implicitly convert type 'decimal?' to 'decimal'./ I did step by step/
Can't add ado. file😒
hi I got this error any body can u help me
Share source code
Database Create to Ms sql server
its desktop application
No web
Hi Sir, Binging of your video you asked for the favor to like and subscribe your chanel, We will help you 100% but below many people asked you for the source code, but you are not replying to them so please be fare if you want us to help you then please help us too, sorry for any inconvenience caused, many Thanks
i dnt have source code right now. long time ago have created. need to check mail