Recent Posts From BestDotNetTraining

Hide And Show Answer Based On Question Click

I have questions and answers, the answers showing when a question has clicked the answer with hiding/show. <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('#showanswer').click(function(){ $('.Question, p').show(); $('#showanswer').hide(); $('#hideanswer').show(); }); $('#hideanswer').click(function(){ $('.Question, p',).hide(); $('#showanswer').show(); $('#hideanswer').hide(); }); }); </script> <style> .Question ...
More
/ JQuery

How To Insert, Update, Delete Using Linq To Sql

Insert Method for Data Linq to Sql: public void InsertCustomer(Customer objCustomer) { \\this is your context object VisionEngineersDBEntities context = new VisionEngineersDBEntities(); objCustomer.DateCreated = DateTime.Now; objCustomer.FKCreatedByUserId = Helper.UserId;//Helper User Id context.Customers.Add(objCustomer); context.SaveChanges(); } Update Method for Data Linq to Sql: public ...
More
/ Linq Solutions

JQuery Tasks

Day: 1 1. working on Selectors in JQuery How to show another div using button onclick? <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#button").click(function(){ $(".show").show(); }); }); </script> </head> <body> <input id="button" type="button" value="read more"> <div class="show" style="display:none">hi, I am ...
More
/ JQuery

How To Get The Specific Records or All Records From Table In Linq

public List<Customer> GetAllCustomers(int? customerId=0) { VisionEngineersDBEntities context = new VisionEngineersDBEntities(); IEnumerable<Customer> qry = context.Customers.ToList(); if (customerId != 0) { qry = qry.Where(i => i.PKCustomerId == customerId).ToList(); } return qry.ToList(); } VisionEngineersDBEntities context = new VisionEngineersDBEntities(); this is your context object The ...
More
/ Linq Solutions

How To send Data From Gridview To Excel In Winforms

The simple way to send the data from gridview to excel Example: Solution private void btnExportExcel_Click(object sender, EventArgs e) { if (dgvEnquiry.RowCount > 0) { objLineItemRepository = new LineItemRepository(); var lstLineItem = objLineItemRepository.GetAllLineItems().Select(x => new { x.CustomerName, x.PRNumber, x.QuotationNumber, x.ItemCode, x.EnquiryQuantity, x.QuotedPrice, ...
More
/ Wind Forms Solutions

Interview Questions on OOP’s

Cracking Interview Questions on OOP’s The question I ask myself, before sharing an info-educational content like this, is what qualifies me to create such content on this subject? I am not going to pretend that I started writing codes & programming ...
More
/ Uncategorized
Loading...