If you want to bind the text box with the instance of customer class object also call one way binding in wpf. first to add a cs class in the project. In which you should take one or more public properties , i will take two public properties and one static method. That static method will return class object. Now, your code look like:
1. Add a Class in the project also paste the below mentioned code. But remember that your class name is match with csharp file name; namespace name match with code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SplashSCreen
{
public class Student
{
public string Name { get; set; }
public string Email { get; set; }
public static Student GetRecord()
{
var student = new Student();
{
student.Name = "Jacob";
student.Email = "narenkumar851@gmail.com";
};
return student;
}
}
}
2. Add a new window in the project. 3. Paste this code inside the grid of window class.
The means of splash screen is a screen through which we can show the booting process of a thread. When you start your computer then first to load booting process after then load operating system. I will do the same thing in wpf. This screen appear before loading the start page. So lets to start it:
1. First to add a new window in the project. 2. Add these properties inside window tag.
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
namespace SplashSCreen
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private const int min_spl_time = 4000;
protected override void OnStartup(StartupEventArgs e)
{
SplashScreen splash = new SplashScreen();
splash.Show();
Stopwatch timer = new Stopwatch();
timer.Start();
base.OnStartup(e);
MainWindow main = new MainWindow();
timer.Stop();
int remaining_time = min_spl_time - (int)timer.ElapsedMilliseconds;
if (remaining_time > 0)
Thread.Sleep(remaining_time);
splash.Close();
}
}
}
Here SplashScreen is the name of window or you can say class name.
Before deleting the data from the dataGrid, first to load the DataGrid using Edmx file. This is done in previous article. In this article we have new column that is DataGridTemplateColumn , in which we have cell template. When we click on button then row is deleted from DataGrid. Before deleting data from DataGrid , access emp_id from selected row .
In this article we will learn how to bind DataGrid using EDMX file in wpf. I already bind dataGrid in window form using EDMX. In both article, i notice that only one difference between both that is xaml file. Lets to start to design this in wpf:
Above mentioned code define the binding structure. I have one dataGrid control in the window. x:Name is a property of each control which is define the class instance , through which we can access other property of control in business logic. I have two Text column in dataGrid which take two attribute first one is Binding and another one is Header. Header represent the DataGrid column name and binding define the actual name of database table column's name.
Note : Before going to code behind must to add EDMX file in the project.
using System.Linq;
using System.Windows;
namespace SplashSCreen
{
/// <summary>
/// Interaction logic for bindgridpanel.xaml
/// </summary>
public partial class bindgridpanel : Window
{
TutorialEntities TE = new TutorialEntities();
public bindgridpanel()
{
InitializeComponent();
loadgrid();
}
private void loadgrid()
{
var data = from d in TE.emps select d;
dataGrid.ItemsSource = data.ToList();
}
}
}
Code generate the following output
After add the edmx file in the project , you can access the public property of context class (here i have 'emps'). Through which we can apply operation on dataGrid.
If you want to add image in window background of WPF application then you should use Window.Background tag in xaml. Before set the image in background you must to add the image in the solution explorer. If you add image in the subfolder then specified the path of the folder like below example.
Today i am taking about listBox in WPF. In previous articles of windows form and web form i already discussed about ListBox. In this article i will use same control in different technology(WPF). We know that ListBox is a container of Objects. Listbox contain ItemsSource property of it which is used to bind it with the database table. You can manually define the listbox items using ListBox itemTemplate. Look at this example :
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace SplashSCreen
{
/// <summary>
/// Interaction logic for bindlist.xaml
/// </summary>
public partial class bindlist : Window
{
public bindlist()
{
InitializeComponent();
loadlist();
}
private void loadlist()
{
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings["connsetting"].ToString();
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from [emp]";
cmd.Connection = con;
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds, "emp");
listBox.DataContext = ds;
}
}
}
Binding process in the code behind model are same in windows form as well as web forms. Only one difference that is DataSource, here we use DataContaxt.
Internet explorer's input box show the password when we click on eye button. When we press the button then show the password but when we release it then input character automatically convert into password format. Today, in this article we will design the input box whose will show the password just like eye button. This article designed in html and functionality of the article will handle by JQuery.
The complete code available in the video, so see this and learn more things about JQuery:
In this video, i have two text box, first is used for hide the password and second is used for show the password. When first time load the browser then hide second text box. When user click on show password button then second textbox take the value of first text box also hide first text box and show second.
Introduction
The Adrotator control displays a sequence of images, known as advertisements, on a Web page. The sequence in which the images appear can be predefined or random in nature. These advertisements, which all Internet users are familiar with, are image files in GIF, JPEG, or other format that the user can click to navigate to the advertiser's website.
Public Properties of the Adrotator Class AdvertisementFile : Obtains or sets the path to an XML document that contain advertisement information.
Design a xml file for advertisements name as "advertisements.xml"
Step-1: Open Visual Studio IDE Step-2 : Create New Web Project
Step-3: In Solution Explorer Add new item
Step-4: Select web form in middle pane also select c# in left pane
Step-5: Change name of the webform as "labelbind.aspx" also select place code in separate file check box
Step-6: Right click on Project name and add new item again.
Step-7: Open a new dialog window Select SQL SERVER database name as a "database.mdf"
Step-8: After click ok Button . a new dialog appear on the screen
Do you want to place the file in App_data folder
Step-9: Click Ok Button in dialog window
Step-10: Open Server Explorer
Step-11 Make a new table inside Database
Step-12:
Step-13: fill This Table with Some value
Step-14: Open " labelbind.aspx " page
Step-15: Drag and Drop label control onto the labelbind.aspx page from toolbox
public partial class labelbind : System.Web.UI.Page
{
public string myname;
SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand();
Introduction
This project is related to school management system. In this project we have a Sql Database to store student information also store their fees details. The main motive behind the project is to persist the student information in single place. So,we can retrieve that information easily and quickly.
Front-end and Back-end:
Front-end : Windows form with c# as business logic
Back-end : SQL Server 2014
How to run this:
How to design the system
First to add new windows form in the solution.
Add some control in the form.
Now, add business logic in the code file.
Module in the project
Add new Student: Through this module we can add student details like : Student name, Student father name , Student mother name, Student address etc.
Edit Details : You can edit details of student by their enrollment id.
Search Student details : You can search stored student details by student name. In this project we can add auto complete type functionality.
Delete Student Details
How to Download : Mail me : narenkumar851@gmail.com
In this article i will show you, how to use progress bar in wpf (Window Presentation Foundation) and how to add it in status bar dynamically. Actually i explained it with basic information, today i will explain more about it. In this article, first to add a status bar in the page after that add a TextBlock control in it. Now the code look like :
You can say, how to apply restriction on input using Jquery. Here, meaning of restriction is, TextBox accept only numbers. Everyone know that TextBox control take character,string, numeric and special character as a input. But in some application we need only single feature like, it accept only number. So, the first question raise in my mind, how to do this, what is the logic behind this. Logic behind this:
First to get the key code like number 8 == backspace, some following keycode available here
Now, match the keycode with the input character, if match then input character are not allowed.
INTRODUCTION
This project is aimed at developing a Web application that depicts online Shopping of mobiles and purchasing using Payment Gateway. Using this software, companies can improve the efficiency of their services. Online Shopping is one of the applications to improve the marketing of the company’s products. This web application involves all the features of the online shopping.
The project entitled Online Mobile Shopping enables customer to buy mobiles or accessories from anywhere through online. This application advertises some of the products for shopping. To buy products, customer has to create an account. Those who does not have an account, they can only view the available product. They can’t buy it. Once the customer has created account, not only he can view the products, he can also add the product to the cart and also he can place an order to buy those products. This application then generates bill for that particular customer. After the confirmation, the customer has to enter his credit card details to buy those products.
Home page :
OVERVIEW:
The project entitled “Online Mobile Shopping” enables customer to buy mobiles or accessories from anywhere through online. This application advertises some of the products for shopping. To buy products, customer has to create an account. Those who does not have an account, they can only view the available product. They can’t buy it. Once the customer has created account, not only he can view the products, he can also add the product to the cart and also he can place an order to buy those products. This application then generates bill for that particular customer. After the confirmation, the customer has to enter his credit card details to buy those products.
OVERALL DESCRIPTION:
Product Perspective: The product will be developed completely independent and dynamic website. Customer must have an account to purchase the product. This application stores all the information in the database which can be retrieved whenever needed and all the validations are performed during the entry of the data by the user thus ensuring that the user can not enter any wrong data which could cause problem later.
Signup page of Mobile shopping project:
Product Function: Initially customer has to register to the website to access most of the features of the application. The customer has to enter the details like username, password…etc. After registration customer will be able to purchase products and the purchased product can be added to the cart. Later customer has to enter his credit card details to buy the products. The confirmation of debit card numbers will be handled by the Pay pal website.
User Characteristics: The user of this product is supposed to be fairly educated about the usage of the computers. He should understand how to store products and he should have knowledge about various products so that they could be saved. A person who has no knowledge of computers will find it difficult to understand the system. But with a little knowledge it will be very easy to handle the project.
Admin: Admin adds the new product and accessories and stores in the database which can be retrieved and used whenever needed and all the validation are performed during the entry of the data. Thus it ensures that the user cannot enter any wrong data which would cause problem later.
User: This application allows the user to access all the products available. To buy the products, customer must create an account in this website.
OBJECTIVE
This software helps customer to find different mobiles, their features, and new updates easily. It is designed such a way that one can view all the updates of the mobile from any place through online. The software will help in easy maintaining and updating products in the website for the administrator. Also quick and easy comparison of different products for the customers
Online Mobile Shopping project is aimed at developing a Web application that depicts online Shopping of mobiles and purchasing using Payment Gateway.
Using this software, companies can improve the efficiency of their services. Online Shopping is one of the applications to improve the marketing of the company’s products. This web application involves all the features of the online shopping.
ABOUT THE PROJECT
1.HARDARE REQUIREMENTS:-
•Processor: Pentium 4 or above
•RAM :1 GB or above
•Hard disk :40 GB or above
2.SOFTWARE REQUIREMENTS:-
•Microsoft Visual Studio 2013
•SQL Database 2014
3.PROJECT ANALYSIS:-
4.PROJECT IMPLEMENTATION:-
•LANGUAGES USED:-
Front End: ASP.NET
Back End: Microsoft SQL Server 2008
•MODULES:- The modules used in this software are as follows:-
LOGIN: This module has a drop down list box from where we have to select ADMIN or USER. The ADMIN has all the rights in the software including updating the status of his site. The other fields in login are username and password. If the username and password are correct then it is directed to next page.
NEW USER: This module is for the users who do not have their account. Here user is allowed to create an account to login. The account creation is done by filling the registration form with user details such as name, phone, email etc.
PRODUCT: This module has information regarding the mobiles such as its name, model, color, price information, its features etc. The ADMIN has the authority to Add, Delete, Update etc. The USER can only view the Mobile, add to cart only those in the stock etc.
ACCESSORIES: This module consists of various available accessories of the Mobile with its name and picture, price information etc.
SEARCH: This module helps the customer to ease his search based on his budget or interest. The search can be done on different categories like mobile model name, model number, color, price etc.
CART: User can select any number of Mobile and add to the cart. He can also remove from the cart if he dislikes it later.
PAYMENT: This module describes the payment done by the customer. The payment information can include information like the model purchased, quantity, mode of payment (cash, loan) etc.
STOCKS: This gives the details regarding the products available for sale.
Download : please mail me: narenkumar851@gmail.com
MYSQL is used to store data permanently also MSACCESS is used. But both are different technology so today i will discuss about difference between both.
MYSQL
MSACCESS
Fully RDBMS
RDBMS
Large application
Small application
Multiple DB Engine
Single DB Engine
More ACID(Atomicity Consistency Integrity Durability) of transaction
Today i am talking about OpenFileDialog control. This control is used for picking some files from computer drive or location. I have already learn about OpenFileDialog control in windows form article. Today, the same article i cover using WPF. The logics are same in all language but some presentation of the language are different Like previous article cover by windows form and this article present by xaml language. Lets take a simple example: In this example, we will pick the text file from computer and read this file by using TextBox.
}
Here OpenFileDialog control is exist in Microsoft.Win32 namespace. So use it by using "using" keyword. If you want to take only text file by this control then use Filter property. After picked file you can read this by using ReadAllText method of File class.