Thursday, December 31, 2015
Monday, December 21, 2015
Skype Multiple Login Same machine
You can login multiple account same machine without using any software.
It is very simple. This video shows how to do it
It is very simple. This video shows how to do it
Wednesday, December 2, 2015
EmployeeController
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCEntity.Context;
using MVCEntity.Models;
using System.Net;
namespace MVCEntity.Controllers
{
public class EmployeeController : Controller
{
//
// GET: /Employee/
private DatabaseContext db = new DatabaseContext();
public ActionResult Index()
{
return View(db.Employees.ToList());
}
//
// GET: /Employee/Details/5
[HttpGet]
public ActionResult Details(int? id)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
Employee employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
return View(employee);
}
//
// GET: /Employee/Create
[HttpGet]
public ActionResult Create()
{
return View();
}
//
// POST: /Employee/Create
[HttpPost]
public ActionResult Create(Employee employee)
{
try
{
if (ModelState.IsValid)
{
db.Employees.Add(employee);
db.SaveChanges();
}
return RedirectToAction("Index");
}
catch
{
return View();
}
}
//
// GET: /Employee/Edit/5
[HttpGet]
public ActionResult Edit(int? id)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
Employee employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
return View(employee);
}
//
// POST: /Employee/Edit/5
[HttpPost]
[ActionName("Edit")]
public ActionResult Edit(Employee employee)
{
try
{
if (ModelState.IsValid)
{
db.Entry(employee).State = System.Data.EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");
}
return View(employee);
}
catch
{
return View();
}
}
//
// GET: /Employee/Delete/5
public ActionResult Delete(int? id)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
Employee employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
return View(employee);
}
//
// POST: /Employee/Delete/5
[HttpPost]
[ActionName("Delete")]
public ActionResult Delete_post(int? id)
{
try
{
// TODO: Add delete logic here
Employee employee = new Employee();
if (ModelState.IsValid)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
db.Employees.Remove(employee);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(employee);
}
catch
{
return View();
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCEntity.Context;
using MVCEntity.Models;
using System.Net;
namespace MVCEntity.Controllers
{
public class EmployeeController : Controller
{
//
// GET: /Employee/
private DatabaseContext db = new DatabaseContext();
public ActionResult Index()
{
return View(db.Employees.ToList());
}
//
// GET: /Employee/Details/5
[HttpGet]
public ActionResult Details(int? id)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
Employee employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
return View(employee);
}
//
// GET: /Employee/Create
[HttpGet]
public ActionResult Create()
{
return View();
}
//
// POST: /Employee/Create
[HttpPost]
public ActionResult Create(Employee employee)
{
try
{
if (ModelState.IsValid)
{
db.Employees.Add(employee);
db.SaveChanges();
}
return RedirectToAction("Index");
}
catch
{
return View();
}
}
//
// GET: /Employee/Edit/5
[HttpGet]
public ActionResult Edit(int? id)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
Employee employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
return View(employee);
}
//
// POST: /Employee/Edit/5
[HttpPost]
[ActionName("Edit")]
public ActionResult Edit(Employee employee)
{
try
{
if (ModelState.IsValid)
{
db.Entry(employee).State = System.Data.EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");
}
return View(employee);
}
catch
{
return View();
}
}
//
// GET: /Employee/Delete/5
public ActionResult Delete(int? id)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
Employee employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
return View(employee);
}
//
// POST: /Employee/Delete/5
[HttpPost]
[ActionName("Delete")]
public ActionResult Delete_post(int? id)
{
try
{
// TODO: Add delete logic here
Employee employee = new Employee();
if (ModelState.IsValid)
{
if (id == null)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
employee = db.Employees.Find(id);
if (employee == null)
return HttpNotFound();
db.Employees.Remove(employee);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(employee);
}
catch
{
return View();
}
}
}
}
Friday, February 21, 2014
View Reservation
sing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
using System.Collections;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
using System.Collections;
using System.Data;
Thursday, February 20, 2014
set item category
//sp
ALTER PROCEDURE [dbo].[usp_SetItemCategory]
@ncName nvarchar(100),
@ncDesctiption nvarchar(256),
@ncImage image,
@StatusID int,
@IsActive bit
ALTER PROCEDURE [dbo].[usp_SetItemCategory]
@ncName nvarchar(100),
@ncDesctiption nvarchar(256),
@ncImage image,
@StatusID int,
@IsActive bit
register
//register.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Registration.aspx.cs" Inherits="SkyShuttleRide.Registration" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Registration.aspx.cs" Inherits="SkyShuttleRide.Registration" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
Login
//login.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="SkyShuttleRide.Login" Title="SkyShuttleRide Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="SkyShuttleRide.Login" Title="SkyShuttleRide Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
Subscribe to:
Posts (Atom)