code
stringlengths 1
2.01M
| repo_name
stringlengths 3
62
| path
stringlengths 1
267
| language
stringclasses 231
values | license
stringclasses 13
values | size
int64 1
2.01M
|
|---|---|---|---|---|---|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;
public partial class Admin_dangnhap : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Url.ToString().Contains("dangnhap.aspx") == false && Session["tk"] == null)
Response.Redirect("~/Admin/dangnhap.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
Criteria cri = new Criteria();
cri.add(Condition.AND, tbNhanVien.tbNhanVienColumns.TaiKhoan.ToString(), Condition.EQUAL, txttk.Text);
int total = 0;
tbNhanVien.tbNhanVienCollection nhanVienCollection = tbNhanVienBUS.Get(cri.Criter, 0, 0, tbNhanVien.tbNhanVienColumns.IDNhanVien.ToString(), OrderDirection.ASC.ToString(), out total);
if (nhanVienCollection.Count > 0)
{
if (nhanVienCollection[0].MatKhau == txtmk.Text)
{
Session["tk"] = txttk.Text;
Response.Redirect("~/Admin/sanphamlist.aspx");
}
else
{
lb_Error.Text = "Mat khau sai . Vui long dang nhap lai ";
}
}
else
{
lb_Error.Text = "Tai khoan khong ton tai. Vui long dang nhap lai ";
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/dangnhap.aspx.cs
|
C#
|
gpl3
| 1,577
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Admin_DoanhNghiepList : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/DoanhNghiepList.aspx.cs
|
C#
|
gpl3
| 419
|
<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="SanPhamAdd.aspx.cs" Inherits="Admin_SanPhamAdd" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="menuPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server">
</asp:Content>
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/SanPhamAdd.aspx
|
ASP.NET
|
gpl3
| 376
|
<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="NhanVienAdd.aspx.cs" Inherits="Admin_NhanVienAdd" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="menuPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server">
</asp:Content>
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/NhanVienAdd.aspx
|
ASP.NET
|
gpl3
| 378
|
<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="sanphamlist.aspx.cs" Inherits="Admin_sanphamlist" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="menuPlaceHolder" Runat="Server">
<h5>Menu</h5>
<ul class ="Actions">
<li><a href ="sanphamlist.aspx">Danh sách sản phẩm</a></li>
<li><a href ="SanPhamAdd.aspx">Thêm mới sản phẩm</a></li>
</ul>
<ul class ="Actions">
<li ><a href ="LoaiSPList.aspx">Danh sách loại sản phẩm</a></li>
<li><a href ="LoaiSPAdd.aspx">Thêm mới loại sản phẩm</a></li>
</ul>
<ul class ="Actions">
<li class="Selected"><a href ="DiaDiemList.aspx">Thông tin địa điểm</a></li>
<li><a href ="DiaDiemAdd.aspx">Thêm mới địa điểm</a></li>
</ul>
<ul class ="Actions">
<li><a href ="DoanhNghiepList.aspx">Danh sách doanh nghiệp</a></li>
<li><a href ="DoanhNghiepAdd.aspx">Thêm mới doanh nghiệp</a></li>
</ul>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server">
<asp:Label ID="lbdn" runat="server" Text="Label"></asp:Label>
<asp:LinkButton ID="thoat" runat="server" Font-Underline="False" ForeColor="Yellow"
OnClick="thoat_Click" Visible="False">Thoát</asp:LinkButton>
</asp:Content>
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/sanphamlist.aspx
|
ASP.NET
|
gpl3
| 1,317
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Admin_SanPhamAdd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/SanPhamAdd.aspx.cs
|
C#
|
gpl3
| 414
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Admin_MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/MasterPage.master.cs
|
C#
|
gpl3
| 420
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Admin_NhanVienList : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/NhanVienList.aspx.cs
|
C#
|
gpl3
| 416
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Utility;
using Entities;
using BUS;
using DAL;
public partial class Admin_DiaDiemList : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
private void LoadData()
{
Pager.PageSize = 5;
Criteria cri = new Criteria();
int total = 0;
if (txt_dd.Text != "")
{
cri.add(Condition.AND, tbDiaDiem.tbDiaDiemColumns.DiaDiem.ToString(), Condition.LIKE, txt_dd.Text);
}
tbDiaDiem.tbDiaDiemCollection ddcollection = tbDiaDiemBUS.Get(cri.Criter, Pager.CurrentIndex, Pager.PageSize,
tbDiaDiem.tbDiaDiemColumns.IDDiaDiem.ToString(), OrderDirection.ASC.ToString(), out total);
Repeater1.DataSource = ddcollection;
Repeater1.DataBind();
Pager.ItemCount = total;
}
protected void btn_Search_Click(object sender, EventArgs e)
{
LoadData();
}
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem ||
e.Item.ItemType == ListItemType.Item)
{
tbDiaDiem dd = (tbDiaDiem)e.Item.DataItem;
HyperLink hyp_dd = (HyperLink)e.Item.FindControl("hyp_dd");
Literal lit_Ma = (Literal)e.Item.FindControl("lit_Ma");
HiddenField hf_id = (HiddenField)e.Item.FindControl("hf_id");
lit_Ma.Text = dd.IDDiaDiem.ToString();
hf_id.Value = dd.IDDiaDiem.ToString();
hyp_dd.Text = dd.DiaDiem.ToString();
hyp_dd.NavigateUrl = "DiaDiemList.aspx";
HyperLink hpl_Edit = (HyperLink)e.Item.FindControl("hpl_Edit");
hpl_Edit.NavigateUrl = "DiaDiemUpdate.aspx?id=" + dd.IDDiaDiem.ToString();
}
}
protected void Pager_Command(object sender, CommandEventArgs e)
{
Pager.CurrentIndex = int.Parse(e.CommandArgument.ToString());
LoadData();
}
protected void lbt_Xoa_Click1(object sender, EventArgs e)
{
for (int i = 0; i < Repeater1.Items.Count; i++)
{
CheckBox cb_Xoa = (CheckBox)Repeater1.Items[i].FindControl("cb_Xoa");
if (cb_Xoa.Checked == true)
{
HiddenField hf_id = (HiddenField)Repeater1.Items[i].FindControl("hf_id");
int id = int.Parse(hf_id.Value);
tbDiaDiem dd = tbDiaDiemBUS.GetByID(id);
tbDiaDiemBUS.Delete_DiaDiem(id);
}
}
Response.Redirect(Request.RawUrl);
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/DiaDiemList.aspx.cs
|
C#
|
gpl3
| 2,971
|
form {
margin: 1em;
padding: 0em;
width: 780px;
}
textarea {
font-size: 1em;
}
div.Row {
margin-top: 8px;
text-align: left;
}
div.ButtonRow {
margin-top: 10px;
margin-left: 1em;
}
input.Button {
font-family: Tahoma,"Trebuchet MS",Arial,Sans-serif;
margin-right: 0.5em;
}
input.Button.Level1 {
width: 6em;
}
.Error,
span.Required {
color: red;
}
.TextBoxSearch {
width: 400px;
}
.DropDownList {
width: 120px;
}
div.Row div,
div.RangeDate div {
display: inline;
margin-right: 2em;
}
* html div.RangeDate div img {
margin-top: 3px;
}
.TopMenu li {
list-style: none;
display: inline;
margin-right: 1em;
}
.TopMenu li.FirstItem {
margin-left: 72%;
}
.addnewrow
{
text-align:right;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
background-color: #ffffff;
padding-bottom:5px;
padding-top:5px;
padding-right:12px;
}
div.Row {
margin-top: 8px;
text-align: left;
}
.Error,
span.Required {
color: red;
}
form {
margin: 1em;
padding: 0em;
width: 100%;
margin:0em;
}
.listtableheader {
FONT-WEIGHT: bold;
FONT-FAMILY: Arial, Helvetica, sans-serif;
BACKGROUND-COLOR: #eeeeee;
text-align:left;
}
.PagerCurrentPageCell{
-moz-border-radius:3px 3px 3px 3px;
height:2.0833em;
overflow:visible;
padding:0 0.5em;
vertical-align:middle;
white-space:nowrap;
background:none repeat scroll 0 0 #DDDDDD;
border-color:#CCCCCC;
color:#000000;
cursor:default;
font-weight:bold;
}
.button,
.PagerOtherPageCells{
-moz-border-radius:3px 3px 3px 3px;
background:-moz-linear-gradient(center top , #FFFFFF, #EFEFEF) repeat scroll 0 0 #F6F6F6;
border:1px solid #CCCCCC;
color:#000000;
cursor:pointer;
height:2.0833em;
overflow:visible;
padding:0 0.5em;
vertical-align:middle;
white-space:nowrap;
}
.PagerHyperlinkStyle
{
text-decoration:none;
color:#0033CC;
}
td {
FONT-SIZE: 11px;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
BACKGROUND-COLOR: #ffffff;
}
.hidden
{
display:none;
}
.readonly{
height: 18px;
border: 0px;
color: #555;
text-indent:3px;
}
.button:hover,
.PagerOtherPageCells:active,
.PagerOtherPageCells:hover
{
border-color:#999;
background:#ddd;
background-image:-moz-linear-gradient(top,#cccccc,#ffffff);
background-image:-webkit-gradient(linear,left top,left bottom,from(#cccccc),to(#ffffff));
filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr=#cccccc,endColorStr=#ffffff)
}
.title
{
height:30px;
font-size:20px;
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/css/form.css
|
CSS
|
gpl3
| 2,676
|
body {
margin: 0px;
padding: 0px;
font-family: Arial, Helvertical, Verdana, sans-serif;
font-size: 70%;
background: url(../images/nav-bg-repeat.jpg) repeat-y;
}
table {
font-size: 1em;
}
div.Clearance {
clear: both;
}
ul.MainMenu {
list-style: none inside none;
margin: 0px;
padding: 0px;
}
ul.MainMenu li {
display: inline;
padding: 0px 0em 0px 1em;
}
ul.MainMenu li.First {
list-style-type: none;
}
#header {
background-color: #4E7DD1;
height: 36px;
color: white;
}
#header h1 {
font-size: 20px;
font-weight: normal;
margin: 6px;
float: left;
}
#header a {
color: white;
font-weight: bold;
text-decoration: none;
}
#header a:hover {
text-decoration: underline;
}
#header ul.MainMenu {
float: right;
padding-top: 5px;
padding-right: 1em;
}
#navigator {
background-image: url(../images/topgrad.gif);
border-top: solid 1px #7795CB;
padding: 3px 2px 2px 2px;
}
#navigator a {
color: white;
font-weight: bold;
text-decoration: none;
}
#navigator a:hover {
text-decoration: underline;
}
#navigator div {
height: 1.5em;
}
#navigator ul.MainMenu li {
padding: 0px;
margin: 0px;
}
#navigator ul.MainMenu li a {
padding: 0px .7em 2px .7em;
}
#navigator ul.MainMenu li.Current a {
background-image: url(../images/nav-item-bg.jpg);
background-repeat: repeat;
color: #131FA5;
border: solid 1px;
border-top-color: #00238B;
border-right-color: #578CEB;
border-bottom-color: #578CEB
}
#title {
border-top: solid 3px #4E7DD1;
border-bottom: solid 1px #D8E0EB;
background-color: white;
}
#title div.Inner {
height: 6px;
}
#title #titleLogo {
width: 180px;
float: left;
background-image: url(../images/headcornerp.gif);
background-repeat: no-repeat;
}
#title #titleLogo h2 {
margin: 0px;
width: 180px;
height: 49px;
background-image: url(../images/spssites.gif);
background-repeat: no-repeat;
background-position: center 0px;
}
#title #titleText {
float: left;
padding-top: 10px;
font-family: Verdana;
}
#title #titleText h3.Repeat {
margin: 0px;
font-weight: normal;
font-size: 1.4em;
color: black;
}
#title #titleText h3 {
margin: 0px;
color: #131FA5;
font-size: 1.2em;
}
#title #titleForm {
float: right;
padding: 0px 0px 0px 6px;
background-color: #4E7DD1;
background-image: url(../images/headcornerx.jpg);
background-repeat: no-repeat;
background-position: 0% 0%;
}
#title #searchForm {
margin: 0px;
padding: .2em .4em .4em .5em;
background-image: url(../images/headcornerz.jpg);
background-repeat: no-repeat;
background-position: 0% 100%;
}
#title #searchForm * {
vertical-align: middle;
}
#sideBar {
position: absolute;
width: 180px;
left: 0px;
font-family: Verdana;
}
#sideBar div {
padding: 1ex;
}
#sideBar h5 {
font-weight: bold;
margin: 0px;
font-size: 1.1em;
}
#sideBar ul a {
color: #003399;
text-decoration: none;
font-size: 11px;
}
#sideBar ul a:hover {
text-decoration: underline;
}
#sideBar ul {
margin: 0.5ex 1ex 1ex 0ex;
border-top: dotted 1px #ADADAD;
}
#sideBar ul.Actions {
list-style-type: none;
padding-left: 0em;
}
#sideBar ul li {
background-image: url(../images/rtbullet.gif);
background-repeat: no-repeat;
background-position: 5px 0.2ex;
padding: 0.5ex 0.5ex 0.5ex 3ex;
}
#sideBar ul li.Selected {
background-image: url(../images/triangle.gif);
background-position: 3px center;
background-color: #F0FFF0;/*white;*/
border: 1px solid #228B22; /*rgb(0, 0, 153);*/
}
#content {
font-size: 1.1em;
margin-left: 180px;
}
#messageContainer {
margin-left: 180px;
display: none;
padding: 3px;
text-align: center;
}
#message {
text-align: center;
padding-left: 2em;
padding-right: 2em;
font-weight: bold;
background-color: rgb(250, 209, 99);
}
td.TL {
background: url(../images/corner_tl.gif) top left;
}
td.TR {
background: url(../images/corner_tr.gif) top right;
}
td.BL {
background: url(../images/corner_bl.gif) bottom left;
}
td.BR {
background: url(../images/corner_br.gif) bottom right;
}
td.TL, td.TR, td.BL, td.BR {
background-repeat: no-repeat;
}
div#footer {
margin-top: 2em;
padding: 0.5em;
clear: both;
color: rgb(200, 200, 200);
background-color: white;
border-top: solid 1px rgb(200, 200, 200);
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/css/default.css
|
CSS
|
gpl3
| 4,538
|
<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="DiaDiemAdd.aspx.cs" Inherits="Admin_DiaDiemAdd" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="menuPlaceHolder" Runat="Server">
<h5>Menu</h5>
<ul class ="Actions">
<li><a href ="sanphamlist.aspx">Danh sách sản phẩm</a></li>
<li><a href ="SanPhamAdd.aspx">Thêm mới sản phẩm</a></li>
</ul>
<ul class ="Actions">
<li ><a href ="LoaiSPList.aspx">Danh sách loại sản phẩm</a></li>
<li><a href ="LoaiSPAdd.aspx">Thêm mới loại sản phẩm</a></li>
</ul>
<ul class ="Actions">
<li><a href ="DiaDiemList.aspx">Thông tin địa điểm</a></li>
<li class="Selected"><a href ="DiaDiemAdd.aspx">Thêm mới địa điểm</a></li>
</ul>
<ul class ="Actions">
<li><a href ="DoanhNghiepList.aspx">Danh sách doanh nghiệp</a></li>
<li><a href ="DoanhNghiepAdd.aspx">Thêm mới doanh nghiệp</a></li>
</ul>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server">
<div >
<div class ="title" >
THÊM MỚI ĐỊA ĐIỂM
</div>
<div >
<table width ="100%" cellspacing ="1" cellpadding ="3" border ="0" >
<tr>
<td style ="width :30%"> Tên địa điểm</td>
<td style ="width :70%"><asp:TextBox ID ="txt_tendd" runat ="server" ></asp:TextBox></td>
</tr>
<tr align="center">
<td style="width :30%; height: 30px;"></td>
<td style="width :70%; height: 30px;"><asp:Button ID ="btdd_them" runat ="server" Text ="Thêm mới địa điểm" OnClick ="btdd_them_Click" ></asp:Button></td>
</tr>
</table>
</div>
</div>
</asp:Content>
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Admin/DiaDiemAdd.aspx
|
ASP.NET
|
gpl3
| 1,801
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbTTGiaoDich
{
private int idTTGiaoDich;
public int IDTTGiaoDich
{
get { return idTTGiaoDich; }
set { idTTGiaoDich = value; }
}
private int idDonHang;
public int IDDonHang
{
get { return idDonHang; }
set { idDonHang = value; }
}
private int idHinhThuc;
public int IDHinhThuc
{
get { return idHinhThuc; }
set { idHinhThuc = value; }
}
private int thanhTien;
public int ThanhTien
{
get { return thanhTien; }
set { thanhTien = value; }
}
public enum tbTTGiaoDichColumns
{
IDTTGiaoDich,
IDDonHang,
IDHinhThuc,
ThanhTien
}
public class tbTTGiaoDichCollection : List<tbTTGiaoDich> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbTTGiaoDich.cs
|
C#
|
gpl3
| 1,045
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbSanPham
{
private int idSanPham;
public int IDSanPham
{
get { return idSanPham; }
set { idSanPham = value; }
}
private string tenSanPham;
public string TenSanPham
{
get { return tenSanPham; }
set { tenSanPham = value; }
}
private string idLoaiSP;
public string IDLoaiSP
{
get { return idLoaiSP; }
set { idLoaiSP = value; }
}
private int idDiaDiem;
public int IDDiaDiem
{
get { return idDiaDiem; }
set { idDiaDiem = value; }
}
private string idHangSanXuat;
public string IDHangSanXuat
{
get { return idHangSanXuat; }
set { idHangSanXuat = value; }
}
private int giaBan;
public int GiaBan
{
get { return giaBan; }
set { giaBan = value; }
}
private int giaTriThuc;
public int GiaTriThuc
{
get { return giaTriThuc; }
set { giaTriThuc = value; }
}
private string dieuKienSuDung;
public string DieuKienSuDung
{
get { return dieuKienSuDung; }
set { dieuKienSuDung = value; }
}
private string moTaSP;
public string MoTaSP
{
get { return moTaSP; }
set { moTaSP = value; }
}
private int soLuongSP;
public int SoLuongSP
{
get { return soLuongSP; }
set { soLuongSP = value; }
}
private int soLuongBan;
public int SoLuongBan
{
get { return soLuongBan; }
set { soLuongBan = value; }
}
private int soLuongDaBan;
public int SoLuongDaBan
{
get { return soLuongDaBan; }
set { soLuongDaBan = value; }
}
private int idTrangThaiSP;
public int IDTrangThaiSP
{
get { return idTrangThaiSP; }
set { idTrangThaiSP = value; }
}
private DateTime ngayBDBan;
public DateTime NgayBDBan
{
get { return ngayBDBan; }
set { ngayBDBan = value; }
}
private DateTime ngayKTBan;
public DateTime NgayKTBan
{
get { return ngayKTBan; }
set { ngayKTBan = value; }
}
private DateTime ngayCapNhat;
public DateTime NgayCapNhat
{
get { return ngayCapNhat; }
set { ngayCapNhat = value; }
}
private string idNhanVien;
public string IDNhanVien
{
get { return idNhanVien; }
set { idNhanVien = value; }
}
private string idDoanhNghiep;
public string IDDoanhNghiep
{
get { return idDoanhNghiep; }
set { idDoanhNghiep = value; }
}
private float tiLeHoaHong;
public float TiLeHoaHong
{
get { return tiLeHoaHong; }
set { tiLeHoaHong = value; }
}
public enum tbSanPhamColumns
{
IDSanPham,
TenSanPham,
IDLoaiSP,
IDDiaDiem,
IDHangSanXuat,
GiaBan,
GiaTriThuc,
DieuKienSuDung,
MoTaSp,
SoLuongSP,
SoLuongBan,
SoLuongDaBan,
IDTrangThaiSP,
NgayBDBan,
NgayKTBan,
NgayCapNhat,
IDNhanVien,
IDDoanhNghiep,
TiLeHoaHong
}
public class tbSanPhamCollection : List<tbSanPham> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbSanPham.cs
|
C#
|
gpl3
| 3,997
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbHangSanXuat
{
private int idHangSanXuat;
public int IDHangSanXuat
{
get { return idHangSanXuat; }
set { idHangSanXuat = value; }
}
private string tenHangSanXuat;
public string TenHangSanXuat
{
get { return tenHangSanXuat; }
set { tenHangSanXuat = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbHangSanXuatColumns
{
IDHangSanXuat,
TenHangSanXuat,
DiaChi,
DienThoai,
Email
}
public class tbHangSanXuatCollection : List<tbHangSanXuat> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbHangSanXuat.cs
|
C#
|
gpl3
| 1,242
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbTTDonHang
{
private int idTTDonHang;
public int IDTTDonHang
{
get { return idTTDonHang; }
set { idTTDonHang = value; }
}
private string trangThaiDH;
public string TrangThaiDH
{
get { return trangThaiDH; }
set { trangThaiDH = value; }
}
public enum tbTTDonHangColumns
{
IDTTDonHang,
TrangThaiDH
}
public class tbTTDonHangCollection : List<tbTTDonHang> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbTTDonHang.cs
|
C#
|
gpl3
| 671
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbHinhAnh
{
private int idHinhAnh;
public int IDHinhAnh
{
get { return idHinhAnh; }
set { idHinhAnh = value; }
}
private int idSanPham;
public int IDSanPham
{
get { return idSanPham; }
set { idSanPham = value; }
}
private string tenHinh;
public string TenHinh
{
get { return tenHinh; }
set { tenHinh = value; }
}
public enum tbHinhAnhColumns
{
IDHinhAnh,
IDSanPham,
TenHinh
}
public class tbHinhAnhCollection : List<tbHinhAnh> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbHinhAnh.cs
|
C#
|
gpl3
| 820
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbTrangThaiSP
{
private int idTrangThaiSP;
public int IDTrangThaiSP
{
get { return idTrangThaiSP; }
set { idTrangThaiSP = value; }
}
private string trangThai;
public string TrangThai
{
get { return trangThai; }
set { trangThai = value; }
}
public enum tbTrangThaiSPColumns
{
IDTrangThaiSP,
TrangThai
}
public class tbTrangThaiSPCollection : List<tbTrangThaiSP> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbTrangThaiSP.cs
|
C#
|
gpl3
| 679
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbDiaDiem
{
private int idDiaDiem;
public int IDDiaDiem
{
get { return idDiaDiem; }
set { idDiaDiem = value; }
}
private string diaDiem;
public string DiaDiem
{
get { return diaDiem; }
set { diaDiem = value; }
}
public enum tbDiaDiemColumns
{
IDDiaDiem,
DiaDiem
}
public class tbDiaDiemCollection : List<tbDiaDiem> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbDiaDiem.cs
|
C#
|
gpl3
| 625
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbLoaiSP
{
private int idLoaiSP;
public int IDLoaiSP
{
get { return idLoaiSP; }
set { idLoaiSP = value; }
}
private string tenLoaiSP;
public string TenLoaiSP
{
get { return tenLoaiSP; }
set { tenLoaiSP = value; }
}
public enum tbLoaiSPColumns
{
IDLoaiSP,
TenLoaiSP
}
public class tbLoaiSPCollection : List<tbLoaiSP> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbLoaiSP.cs
|
C#
|
gpl3
| 615
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbHTThanhToan
{
private int idHinhThuc;
public int IDHinhThuc
{
get { return idHinhThuc; }
set { idHinhThuc = value; }
}
private string tenHinhThuc;
public string TenHinhThuc
{
get { return tenHinhThuc; }
set { tenHinhThuc = value; }
}
public enum tbHTThanhToanColumns
{
IDHinhThuc,
TenHinhThuc
}
public class tbHTThanhToanCollection : List<tbHTThanhToan> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbHTThanhToan.cs
|
C#
|
gpl3
| 675
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbChiTietDH
{
private int idCTDH;
public int IDCTDH
{
get { return idCTDH; }
set { idCTDH = value; }
}
private int idSanPham;
public int IDSanPham
{
get { return idSanPham; }
set { idSanPham = value; }
}
private int idDonHang;
public int IDDonHang
{
get { return idDonHang; }
set { idDonHang = value; }
}
private int soLuong;
public int SoLuong
{
get { return soLuong; }
set { soLuong = value; }
}
private int donGia;
public int DonGia
{
get { return donGia; }
set { donGia = value; }
}
private int thanhTien;
public int ThanhTien
{
get { return thanhTien; }
set { thanhTien = value; }
}
public enum tbChiTietDHColumns
{
IDCTDH,
IDSanPham,
IDDonHang,
SoLuong,
DonGia,
ThanhTien
}
public class tbChiTietDHCollection : List <tbChiTietDH >{}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbChiTietDH.cs
|
C#
|
gpl3
| 1,354
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Entities")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CNTP")]
[assembly: AssemblyProduct("Entities")]
[assembly: AssemblyCopyright("Copyright © CNTP 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ac5e8f46-d541-47a8-8958-bb77e756ab42")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/Properties/AssemblyInfo.cs
|
C#
|
gpl3
| 1,395
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbDonHang
{
private int idDonHang;
public int IDDonHang
{
get { return idDonHang; }
set { idDonHang = value; }
}
private int idKhachHang;
public int IDKhachHang
{
get { return idKhachHang; }
set { idKhachHang = value; }
}
private DateTime ngayDH;
public DateTime NgayDH
{
get { return ngayDH; }
set { ngayDH = value; }
}
private int idTTDonHang;
public int IDTTDonHang
{
get { return idTTDonHang; }
set { idTTDonHang = value; }
}
private int triGia;
public int TriGia
{
get { return triGia; }
set { triGia = value; }
}
private DateTime ngayGiaoHang;
public DateTime NgayGiaoHang
{
get { return ngayGiaoHang; }
set { ngayGiaoHang = value; }
}
public enum tbDonHangColumns
{
IDDonHang,
IDKhachHang,
NgayDH,
IDTTDonHang,
TriGia,
NgayGiaoHang
}
public class tbDonHangCollection : List<tbDonHang> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbDonHang.cs
|
C#
|
gpl3
| 1,410
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbDoanhNghiep
{
private int idDoanhNghiep;
public int IDDoanhNghiep
{
get { return idDoanhNghiep; }
set { idDoanhNghiep = value; }
}
private string tenDoanhNghiep;
public string TenDoanhNghiep
{
get { return tenDoanhNghiep; }
set { tenDoanhNghiep = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbDoanhNghiepColumns
{
IDDoanhNghiep,
TenDoanhNghiep,
DiaChi,
DienThoai,
Email
}
public class tbDoanhNghiepCollection : List<tbDoanhNghiep> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbDoanhNghiep.cs
|
C#
|
gpl3
| 1,202
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbMaSoSP
{
private int idMSSP;
public int IDMSSP
{
get { return idMSSP; }
set { idMSSP = value; }
}
private int idCTDH;
public int IDCTDH
{
get { return idCTDH; }
set { idCTDH = value; }
}
private int maSo;
public int MaSo
{
get { return maSo; }
set { maSo = value; }
}
private string trangThai ;
public string TrangThai
{
get { return trangThai ; }
set { trangThai = value; }
}
public enum tbMaSoSPColumns
{
IDMSSP,
IDCTDH,
MaSo,
TrangThai
}
public class tbMaSoSPCollection : List<tbMaSoSP> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbMaSoSP.cs
|
C#
|
gpl3
| 962
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbNhanVien
{
private int idNhanVien;
public int IDNhanVien
{
get { return idNhanVien; }
set { idNhanVien = value; }
}
private string tenNV;
public string TenNV
{
get { return tenNV; }
set { tenNV = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
private string taiKhoan;
public string TaiKhoan
{
get { return taiKhoan ; }
set { taiKhoan = value; }
}
private string matKhau;
public string MatKhau
{
get { return matKhau ; }
set { matKhau = value; }
}
public enum tbNhanVienColumns
{
IDNhanVien,
TenNV,
DiaChi,
DienThoai,
Email,
TaiKhoan,
MatKhau
}
public class tbNhanVienCollection : List<tbNhanVien> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbNhanVien.cs
|
C#
|
gpl3
| 1,545
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbKhachHang
{
private int idKhachHang;
public int IDKhachHang
{
get { return idKhachHang; }
set { idKhachHang = value; }
}
private string tenKH;
public string TenKH
{
get { return tenKH; }
set { tenKH = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbKhachHangColumns
{
IDKhachHang,
TenKH,
DiaChi,
DienThoai,
Email
}
public class tbKhachHangCollection : List<tbKhachHang> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Entities/tbKhachHang.cs
|
C#
|
gpl3
| 1,179
|
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Default.aspx.cs
|
C#
|
gpl3
| 380
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/Default.aspx
|
ASP.NET
|
gpl3
| 446
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbLoaiSPDAL
{
private SqlConnection cn = null;
public tbLoaiSPDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbLoaiSP lsp)
{
SqlCommand cm = new SqlCommand("LoaiSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenLoaiSP ", lsp.TenLoaiSP);
cm.ExecuteNonQuery();
}
public void Update(tbLoaiSP lsp)
{
SqlCommand cm = new SqlCommand("LoaiSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenLoaiSP ", lsp.TenLoaiSP);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("LoaiSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDLoaiSP ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbLoaiSP.tbLoaiSPCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("tbLoaiSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbLoaiSP.tbLoaiSPCollection lspcollection = new tbLoaiSP.tbLoaiSPCollection();
while (dr.Read())
{
tbLoaiSP lsp = new tbLoaiSP();
lsp.IDLoaiSP = int.Parse (dr.GetValue(0).ToString());
lsp.TenLoaiSP = dr.GetValue(1).ToString();
lspcollection.Add(lsp);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return lspcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbLoaiSPDAL.cs
|
C#
|
gpl3
| 2,802
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbHangSanXuatDAL
{
private SqlConnection cn = null;
public tbHangSanXuatDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbHangSanXuat HangSanXuat)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenHangSanXuat ", HangSanXuat.TenHangSanXuat);
cm.Parameters.AddWithValue("@DiaChi", HangSanXuat.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", HangSanXuat.DienThoai);
cm.Parameters.AddWithValue("@Email", HangSanXuat.Email);
cm.ExecuteNonQuery();
}
public void Update(tbHangSanXuat HangSanXuat)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHangSanXuat ", HangSanXuat.IDHangSanXuat);
cm.Parameters.AddWithValue("@TenHangSanXuat", HangSanXuat.TenHangSanXuat);
cm.Parameters.AddWithValue("@DiaChi", HangSanXuat.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", HangSanXuat.DienThoai);
cm.Parameters.AddWithValue("@Email", HangSanXuat.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHangSanXuat ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbHangSanXuat.tbHangSanXuatCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbHangSanXuat.tbHangSanXuatCollection HangSanXuatcollection = new tbHangSanXuat.tbHangSanXuatCollection();
while (dr.Read())
{
tbHangSanXuat HangSanXuat = new tbHangSanXuat();
HangSanXuat.IDHangSanXuat =int.Parse (dr.GetValue(0).ToString());
HangSanXuat.TenHangSanXuat = dr.GetValue(1).ToString();
HangSanXuat.DiaChi = dr.GetValue(2).ToString();
HangSanXuat.DienThoai = int.Parse(dr.GetValue(3).ToString());
HangSanXuat.Email = dr.GetValue(4).ToString();
HangSanXuatcollection.Add(HangSanXuat);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return HangSanXuatcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbHangSanXuatDAL.cs
|
C#
|
gpl3
| 3,694
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbDoanhNghiepDAL
{
private SqlConnection cn = null;
public tbDoanhNghiepDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbDoanhNghiep dn)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenDoanhNghiep ", dn.TenDoanhNghiep);
cm.Parameters.AddWithValue("@DiaChi", dn.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", dn.DienThoai);
cm.Parameters.AddWithValue("@Email", dn.Email);
cm.ExecuteNonQuery();
}
public void Update(tbDoanhNghiep dn)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenDoanhNghiep ", dn.TenDoanhNghiep);
cm.Parameters.AddWithValue("@DiaChi", dn.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", dn.DienThoai);
cm.Parameters.AddWithValue("@Email", dn.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDoanhNghiep ", Id);
cm.ExecuteNonQuery();
}
public tbDoanhNghiep.tbDoanhNghiepCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbDoanhNghiep.tbDoanhNghiepCollection dncollection = new tbDoanhNghiep.tbDoanhNghiepCollection();
while (dr.Read())
{
tbDoanhNghiep dn = new tbDoanhNghiep();
dn.IDDoanhNghiep = int.Parse(dr.GetValue(0).ToString());
dn.TenDoanhNghiep = dr.GetValue(1).ToString();
dn.DiaChi = dr.GetValue(2).ToString();
dn.DienThoai =int.Parse ( dr.GetValue(3).ToString());
dn.Email = dr.GetValue(4).ToString();
dncollection.Add(dn);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return dncollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbDoanhNghiepDAL.cs
|
C#
|
gpl3
| 3,392
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class tbDiaDiemDAL
{
private SqlConnection cn = null;
public tbDiaDiemDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbDiaDiem dd)
{
SqlCommand cm = new SqlCommand("DiaDiem_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@DiaDiem ", dd.DiaDiem);
cm.ExecuteNonQuery();
}
public void Update(tbDiaDiem dd)
{
SqlCommand cm = new SqlCommand("DiaDiem_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@DiaDiem ", dd.DiaDiem);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("DiaDiem_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDiaDiem ", Id);
cm.ExecuteNonQuery();
}
public tbDiaDiem.tbDiaDiemCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("tbDiaDiem_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbDiaDiem.tbDiaDiemCollection ddcollection = new tbDiaDiem.tbDiaDiemCollection();
while (dr.Read())
{
tbDiaDiem dd = new tbDiaDiem();
dd.IDDiaDiem = int.Parse(dr.GetValue(0).ToString());
dd.DiaDiem = dr.GetValue(1).ToString();
ddcollection.Add(dd);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ddcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbDiaDiemDAL.cs
|
C#
|
gpl3
| 2,731
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbTrangThaiSPDAL
{
private SqlConnection cn = null;
public tbTrangThaiSPDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbTrangThaiSP ttsp)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThai ", ttsp.TrangThai);
cm.ExecuteNonQuery();
}
public void Update(tbTrangThaiSP ttsp)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThai ", ttsp.TrangThai);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDTrangThaiSP ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbTrangThaiSP.tbTrangThaiSPCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbTrangThaiSP.tbTrangThaiSPCollection ttspcollection = new tbTrangThaiSP.tbTrangThaiSPCollection();
while (dr.Read())
{
tbTrangThaiSP ttsp = new tbTrangThaiSP();
ttsp.IDTrangThaiSP = int.Parse(dr.GetValue(0).ToString());
ttsp.TrangThai = dr.GetValue(1).ToString();
ttspcollection.Add(ttsp);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ttspcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbTrangThaiSPDAL.cs
|
C#
|
gpl3
| 2,903
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class tbHTThanhToanDAL
{
private SqlConnection cn = null;
public tbHTThanhToanDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbHTThanhToan hhtt)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenHinhThuc ", hhtt.TenHinhThuc);
cm.ExecuteNonQuery();
}
public void Update(tbHTThanhToan hhtt)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenHinhThuc ", hhtt.TenHinhThuc);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHinhThuc ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbHTThanhToan.tbHTThanhToanCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbHTThanhToan.tbHTThanhToanCollection nvcollection = new tbHTThanhToan.tbHTThanhToanCollection();
while (dr.Read())
{
tbHTThanhToan httt = new tbHTThanhToan();
httt.IDHinhThuc = int.Parse(dr.GetValue(0).ToString());
httt.TenHinhThuc = dr.GetValue(1).ToString();
nvcollection.Add(httt);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return nvcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbHTThanhToannDAL.cs
|
C#
|
gpl3
| 2,916
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data.SqlClient;
using Entities;
namespace DAL
{
public class tbKhachHangDAL
{
private SqlConnection cn = null;
public tbKhachHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbKhachHang kh)
{
SqlCommand cm = new SqlCommand("KhachHang_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenKH", kh.TenKH);
cm.Parameters.AddWithValue("@DiaChi", kh.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", kh.DienThoai);
cm.Parameters.AddWithValue("@Email", kh.Email);
cm.ExecuteNonQuery();
}
public void Update(tbKhachHang kh)
{
SqlCommand cm = new SqlCommand("KhachHang_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenKH", kh.TenKH);
cm.Parameters.AddWithValue("@DiaChi", kh.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", kh.DienThoai);
cm.Parameters.AddWithValue("@Email", kh.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("KhachHang_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDKhachHang", Id);
cm.ExecuteNonQuery();
}
public Entities.tbKhachHang.tbKhachHangCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("sp_tbKhachHang_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbKhachHang.tbKhachHangCollection khcollection = new tbKhachHang.tbKhachHangCollection();
while (dr.Read())
{
tbKhachHang kh = new tbKhachHang();
kh.IDKhachHang = int.Parse(dr.GetValue(0).ToString());
kh.TenKH = dr.GetValue(1).ToString();
kh.DiaChi = dr.GetValue(2).ToString();
kh.DienThoai =int.Parse ( dr.GetValue(3).ToString());
kh.Email = dr.GetValue(4).ToString();
khcollection.Add(kh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return khcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbKhachHangDAL.cs
|
C#
|
gpl3
| 3,383
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbDonHangDAL
{
private SqlConnection cn = null;
public tbDonHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbDonHang donhang)
{
SqlCommand cm = new SqlCommand("DonHang_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", donhang.IDDonHang);
cm.Parameters.AddWithValue("@IDKhachHang ", donhang.IDKhachHang);
cm.Parameters.AddWithValue("@NgayDH ", donhang.NgayDH);
cm.Parameters.AddWithValue("@IDTTDonHang ", donhang.IDTTDonHang);
cm.Parameters.AddWithValue("@TriGia ", donhang.TriGia);
cm.Parameters.AddWithValue("@NgayGiaoHang ", donhang.NgayGiaoHang);
cm.ExecuteNonQuery();
}
public void Update(tbDonHang donhang)
{
SqlCommand cm = new SqlCommand("DonHang_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", donhang.IDDonHang);
cm.Parameters.AddWithValue("@IDKhachHang ", donhang.IDKhachHang);
cm.Parameters.AddWithValue("@NgayDH ", donhang.NgayDH);
cm.Parameters.AddWithValue("@IDTTDonHang ", donhang.IDTTDonHang);
cm.Parameters.AddWithValue("@TriGia ", donhang.TriGia);
cm.Parameters.AddWithValue("@NgayGiaoHang ", donhang.NgayGiaoHang);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("DonHang_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@MaDH", Id);
cm.ExecuteNonQuery();
}
public tbDonHang.tbDonHangCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("DonHang_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbDonHang.tbDonHangCollection dhcollection = new tbDonHang.tbDonHangCollection();
while (dr.Read())
{
tbDonHang dh = new tbDonHang();
dh.IDDonHang = int.Parse(dr.GetValue(0).ToString());
dh.IDKhachHang = int.Parse(dr.GetValue(1).ToString());
dh.NgayDH = DateTime.Parse(dr.GetValue(2).ToString());
dh.IDTTDonHang = int.Parse(dr.GetValue(3).ToString());
dh.TriGia = int.Parse(dr.GetValue(4).ToString());
dh.NgayGiaoHang = DateTime.Parse(dr.GetValue(5).ToString());
dhcollection.Add(dh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return dhcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbDonHangDAL.cs
|
C#
|
gpl3
| 3,798
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbMaSoSPDAL
{
private SqlConnection cn = null;
public tbMaSoSPDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbMaSoSP mssp)
{
SqlCommand cm = new SqlCommand("MaSoSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDCTDH ", mssp.IDCTDH);
cm.Parameters.AddWithValue("@MaSo ", mssp.MaSo);
cm.Parameters.AddWithValue("@TrangThai ", mssp.TrangThai);
cm.ExecuteNonQuery();
}
public void Update(tbMaSoSP mssp)
{
SqlCommand cm = new SqlCommand("MaSoSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDMSSP ", mssp.IDMSSP);
cm.Parameters.AddWithValue("@IDCTDH ", mssp.IDCTDH);
cm.Parameters.AddWithValue("@MaSo ", mssp.MaSo);
cm.Parameters.AddWithValue("@TrangThai ", mssp.TrangThai);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("MaSoSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDMSSP ", Id);
cm.ExecuteNonQuery();
}
public tbMaSoSP.tbMaSoSPCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("MaSoSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbMaSoSP.tbMaSoSPCollection msspcollection = new tbMaSoSP.tbMaSoSPCollection();
while (dr.Read())
{
tbMaSoSP mssp = new tbMaSoSP();
mssp.IDMSSP = int.Parse(dr.GetValue(0).ToString());
mssp.IDCTDH = int.Parse (dr.GetValue(1).ToString());
mssp.MaSo = int.Parse (dr.GetValue(1).ToString());
msspcollection.Add(mssp);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return msspcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbMaSoSPDAL.cs
|
C#
|
gpl3
| 3,139
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbTTGiaoDichDAL
{
private SqlConnection cn = null;
public tbTTGiaoDichDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbTTGiaoDich ttgd)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", ttgd.IDDonHang);
cm.Parameters.AddWithValue("@IDHinhThuc ", ttgd.IDHinhThuc);
cm.Parameters.AddWithValue("@ThanhTien ", ttgd.ThanhTien);
cm.ExecuteNonQuery();
}
public void Update(tbTTGiaoDich ttgd)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", ttgd.IDDonHang);
cm.Parameters.AddWithValue("@IDHinhThuc ", ttgd.IDHinhThuc);
cm.Parameters.AddWithValue("@ThanhTien ", ttgd.ThanhTien);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDTTGiaoDich ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbTTGiaoDich.tbTTGiaoDichCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbTTGiaoDich.tbTTGiaoDichCollection ttgdcollection = new tbTTGiaoDich.tbTTGiaoDichCollection();
while (dr.Read())
{
tbTTGiaoDich ttgd = new tbTTGiaoDich();
ttgd.IDTTGiaoDich = int.Parse(dr.GetValue(0).ToString());
ttgd.IDDonHang = int.Parse(dr.GetValue(1).ToString());
ttgd.IDHinhThuc = int.Parse(dr.GetValue(2).ToString());
ttgd.ThanhTien = int.Parse(dr.GetValue(3).ToString());
ttgdcollection.Add(ttgd);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ttgdcollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbTTGiaoDichDAL.cs
|
C#
|
gpl3
| 3,263
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DAL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CNTP")]
[assembly: AssemblyProduct("DAL")]
[assembly: AssemblyCopyright("Copyright © CNTP 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c2769ca7-a6c0-4fe5-b671-0a8930051d02")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/Properties/AssemblyInfo.cs
|
C#
|
gpl3
| 1,385
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class tbsanphamDAL
{
private SqlConnection cn = null;
public tbsanphamDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbSanPham sanpham)
{
SqlCommand cm = new SqlCommand("SanPham_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDLoaiSP", sanpham.IDLoaiSP);
cm.Parameters.AddWithValue("@IDDiaDiem", sanpham.IDDiaDiem);
cm.Parameters.AddWithValue("@IDHangSanXuat", sanpham.IDHangSanXuat);
cm.Parameters.AddWithValue("@GiaBan", sanpham.GiaBan);
cm.Parameters.AddWithValue("@GiaTriThuc", sanpham.GiaTriThuc);
cm.Parameters.AddWithValue("@DieuKienSuDung", sanpham.DieuKienSuDung);
cm.Parameters.AddWithValue("@MoTaSP", sanpham.MoTaSP);
cm.Parameters.AddWithValue("@SoLuongSP", sanpham.SoLuongSP);
cm.Parameters.AddWithValue("@SoLuongBan", sanpham.SoLuongBan);
cm.Parameters.AddWithValue("@SoLuongDaBan", sanpham.SoLuongDaBan);
cm.Parameters.AddWithValue("@IDTrangThaiSP", sanpham.IDTrangThaiSP);
cm.Parameters.AddWithValue("@NgayBDBan", sanpham.NgayBDBan);
cm.Parameters.AddWithValue("@NgayKTBan", sanpham.NgayKTBan);
cm.Parameters.AddWithValue("@NgayCapNhat", sanpham.NgayCapNhat);
cm.Parameters.AddWithValue("@IDNhanVien", sanpham.IDNhanVien);
cm.Parameters.AddWithValue("@IDDoanhNghiep", sanpham.IDDoanhNghiep);
cm.Parameters.AddWithValue("@TiLeHoaHong", sanpham.TiLeHoaHong);
cm.ExecuteNonQuery();
}
public void Update(tbSanPham sanpham)
{
SqlCommand cm = new SqlCommand("SanPham_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDLoaiSP", sanpham.IDLoaiSP);
cm.Parameters.AddWithValue("@IDDiaDiem", sanpham.IDDiaDiem);
cm.Parameters.AddWithValue("@IDHangSanXuat", sanpham.IDHangSanXuat);
cm.Parameters.AddWithValue("@GiaBan", sanpham.GiaBan);
cm.Parameters.AddWithValue("@GiaTriThuc", sanpham.GiaTriThuc);
cm.Parameters.AddWithValue("@DieuKienSuDung", sanpham.DieuKienSuDung);
cm.Parameters.AddWithValue("@MoTaSP", sanpham.MoTaSP);
cm.Parameters.AddWithValue("@SoLuongSP", sanpham.SoLuongSP);
cm.Parameters.AddWithValue("@SoLuongBan", sanpham.SoLuongBan);
cm.Parameters.AddWithValue("@SoLuongDaBan", sanpham.SoLuongDaBan);
cm.Parameters.AddWithValue("@IDTrangThaiSP", sanpham.IDTrangThaiSP);
cm.Parameters.AddWithValue("@NgayBDBan", sanpham.NgayBDBan);
cm.Parameters.AddWithValue("@NgayKTBan", sanpham.NgayKTBan);
cm.Parameters.AddWithValue("@NgayCapNhat", sanpham.NgayCapNhat);
cm.Parameters.AddWithValue("@IDNhanVien", sanpham.IDNhanVien);
cm.Parameters.AddWithValue("@IDDoanhNghiep", sanpham.IDDoanhNghiep);
cm.Parameters.AddWithValue("@TiLeHoaHong", sanpham.TiLeHoaHong);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("SanPham_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDSanPham", Id);
cm.ExecuteNonQuery();
}
public Entities.tbSanPham.tbSanPhamCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("SanPham_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbSanPham.tbSanPhamCollection sanphamcollection = new tbSanPham.tbSanPhamCollection();
while (dr.Read())
{
tbSanPham sanpham = new tbSanPham();
sanpham.IDSanPham = int.Parse(dr.GetValue(0).ToString());
sanpham.TenSanPham = dr.GetValue(1).ToString();
sanpham.IDLoaiSP =dr.GetValue(2).ToString();
sanpham.IDDiaDiem = int.Parse(dr.GetValue(3).ToString());
sanpham.IDHangSanXuat = dr.GetValue(4).ToString();
sanpham.GiaBan = int.Parse(dr.GetValue(5).ToString());
sanpham.GiaTriThuc =int.Parse( dr.GetValue(6).ToString());
sanpham.DieuKienSuDung = dr.GetValue(7).ToString();
sanpham.MoTaSP = dr.GetValue(8).ToString();
sanpham.SoLuongSP = int.Parse(dr.GetValue(9).ToString());
sanpham.SoLuongBan = int.Parse(dr.GetValue(10).ToString());
sanpham.SoLuongDaBan = int.Parse(dr.GetValue(11).ToString());
sanpham.IDTrangThaiSP = int.Parse(dr.GetValue(12).ToString());
sanpham.NgayBDBan = DateTime.Parse(dr.GetValue(13).ToString());
sanpham.NgayKTBan = DateTime.Parse(dr.GetValue(14).ToString());
sanpham.NgayCapNhat = DateTime.Parse (dr.GetValue(15).ToString());
sanpham.IDNhanVien = dr.GetValue(16).ToString();
sanpham.IDDoanhNghiep =dr.GetValue(17).ToString();
sanpham.TiLeHoaHong = float.Parse(dr.GetValue(18).ToString());
sanphamcollection.Add(sanpham);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return sanphamcollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbSanPhamDAL.cs
|
C#
|
gpl3
| 6,513
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbNhanVienDAL
{
private SqlConnection cn = null;
public tbNhanVienDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbNhanVien nv)
{
SqlCommand cm = new SqlCommand("NhanVien_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenNV", nv.TenNV);
cm.Parameters.AddWithValue("@DiaChi", nv.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", nv.DienThoai);
cm.Parameters.AddWithValue("@Email", nv.Email);
cm.Parameters.AddWithValue("@TaiKhoan", nv.TaiKhoan);
cm.Parameters.AddWithValue("@MatKhau", nv.MatKhau);
cm.ExecuteNonQuery();
}
public void Update(tbNhanVien nv)
{
SqlCommand cm = new SqlCommand("NhanVien_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenNV", nv.TenNV);
cm.Parameters.AddWithValue("@DiaChi", nv.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", nv.DienThoai);
cm.Parameters.AddWithValue("@Email", nv.Email);
cm.Parameters.AddWithValue("@TaiKhoan", nv.TaiKhoan);
cm.Parameters.AddWithValue("@MatKhau", nv.MatKhau);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("NhanVien_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDNhanVien", Id);
cm.ExecuteNonQuery();
}
public Entities.tbNhanVien.tbNhanVienCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("tbNhanVien_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbNhanVien.tbNhanVienCollection nvcollection = new tbNhanVien.tbNhanVienCollection();
while (dr.Read())
{
tbNhanVien nv = new tbNhanVien();
nv.IDNhanVien = int.Parse (dr.GetValue(0).ToString());
nv.TenNV = dr.GetValue(1).ToString();
nv.DiaChi = dr.GetValue(2).ToString();
nv.DienThoai = int.Parse(dr.GetValue(3).ToString());
nv.Email = dr.GetValue(4).ToString();
nv.TaiKhoan = dr.GetValue(5).ToString();
nv.MatKhau = dr.GetValue(6).ToString();
nvcollection.Add(nv);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return nvcollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbNhanVienDAL.cs
|
C#
|
gpl3
| 3,775
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbTTDonHangDAL
{
private SqlConnection cn = null;
public tbTTDonHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbTTDonHang ttdh)
{
SqlCommand cm = new SqlCommand("HTTDonHang_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThaiDH ", ttdh.TrangThaiDH);
cm.ExecuteNonQuery();
}
public void Update(tbTTDonHang ttdh)
{
SqlCommand cm = new SqlCommand("TTDonHang_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThaiDH ", ttdh.TrangThaiDH);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("TTDonHang_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDTTDonHang ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbTTDonHang.tbTTDonHangCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("TTDonHang_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbTTDonHang.tbTTDonHangCollection ttdhcollection = new tbTTDonHang.tbTTDonHangCollection();
while (dr.Read())
{
tbTTDonHang ttdh = new tbTTDonHang();
ttdh.IDTTDonHang = int.Parse(dr.GetValue(0).ToString());
ttdh.TrangThaiDH = dr.GetValue(1).ToString();
ttdhcollection.Add(ttdh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ttdhcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbTTDonHangDAL.cs
|
C#
|
gpl3
| 2,814
|
using System;
using System.Collections.Generic;
using System.Text;
namespace DAL
{
public class Class1
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/Class1.cs
|
C#
|
gpl3
| 132
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbHinhAnhDAL
{
private SqlConnection cn = null;
public tbHinhAnhDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbHinhAnh ha)
{
SqlCommand cm = new SqlCommand("HinhAnh_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDSanPham ", ha.IDSanPham);
cm.Parameters.AddWithValue("@TenHinh ", ha.TenHinh);
cm.ExecuteNonQuery();
}
public void Update(tbHinhAnh ha)
{
SqlCommand cm = new SqlCommand("HinhAnh_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDSanPham ", ha.IDSanPham);
cm.Parameters.AddWithValue("@TenHinh ", ha.TenHinh);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("HinhAnh_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHinhAnh ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbHinhAnh.tbHinhAnhCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("HinhAnh_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbHinhAnh.tbHinhAnhCollection hacollection = new tbHinhAnh.tbHinhAnhCollection();
while (dr.Read())
{
tbHinhAnh ha = new tbHinhAnh();
ha.IDHinhAnh = int.Parse(dr.GetValue(0).ToString());
ha.IDSanPham = int.Parse(dr.GetValue(1).ToString());
ha.TenHinh = dr.GetValue(2).ToString();
hacollection.Add(ha);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return hacollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbHinhAnhDAL.cs
|
C#
|
gpl3
| 2,944
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbCTDonHangDAL
{
private SqlConnection cn = null;
public tbCTDonHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbChiTietDH ctdh)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDCTDH ", ctdh.IDCTDH);
cm.Parameters.AddWithValue("@IDSanPham ", ctdh.IDSanPham);
cm.Parameters.AddWithValue("@IDDonHang ", ctdh.IDDonHang);
cm.Parameters.AddWithValue("@SoLuong ", ctdh.SoLuong);
cm.Parameters.AddWithValue("@ThanhTien ", ctdh.ThanhTien);
cm.ExecuteNonQuery();
}
public void Update(tbChiTietDH ctdh)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDCTDH ", ctdh.IDCTDH);
cm.Parameters.AddWithValue("@IDSanPham ", ctdh.IDSanPham);
cm.Parameters.AddWithValue("@IDDonHang ", ctdh.IDDonHang);
cm.Parameters.AddWithValue("@SoLuong ", ctdh.SoLuong);
cm.Parameters.AddWithValue("@ThanhTien ", ctdh.ThanhTien);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@MaCTDonHang", Id);
cm.ExecuteNonQuery();
}
public Entities.tbChiTietDH.tbChiTietDHCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbChiTietDH.tbChiTietDHCollection ctdhcollection = new tbChiTietDH.tbChiTietDHCollection();
while (dr.Read())
{
tbChiTietDH ctdh = new tbChiTietDH();
ctdh.IDCTDH = int.Parse(dr.GetValue(0).ToString());
ctdh.IDSanPham = int.Parse(dr.GetValue(1).ToString());
ctdh.IDDonHang = int.Parse(dr.GetValue(2).ToString());
ctdh.SoLuong = int.Parse(dr.GetValue(3).ToString());
ctdh.ThanhTien = int.Parse(dr.GetValue(4).ToString());
ctdhcollection.Add(ctdh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ctdhcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1 _ them diadiem,loaisp/02cdnth2_nhom1_vantuan/Website/DAL/tbCTDonHangDAL.cs
|
C#
|
gpl3
| 3,557
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbDoanhNghiepBus
{
public static void Insert_DoanhNghiep(tbDoanhNghiep doanhnghiep)
{
tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL();
doanhnghiepDAL.Insert(doanhnghiep);
}
public static void Update_DoanhNghiep(tbDoanhNghiep doanhnghiep)
{
tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL();
doanhnghiepDAL.Update(doanhnghiep);
}
public static void Delete_DoanhNghiep(int Id)
{
tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL();
doanhnghiepDAL.Delete(Id);
}
public static tbDoanhNghiep.tbDoanhNghiepCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL();
return (doanhnghiepDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbDoanhNghiep.tbDoanhNghiepCollection GetAll()
{
int total = 0;
tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL();
return doanhnghiepDAL.Get("Where 1=1", 0, 0, tbDoanhNghiep.tbDoanhNghiepColumns.IDDoanhNghiep.ToString(), "ASC", out total);
}
public static tbDoanhNghiep GetByID(int iD)
{
int total = 0;
tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL();
tbDoanhNghiep.tbDoanhNghiepCollection doanhnghiepcollection = doanhnghiepDAL.Get("where " + tbDoanhNghiep.tbDoanhNghiepColumns.IDDoanhNghiep.ToString() + "=" + iD.ToString(), 0, 0, tbDoanhNghiep.tbDoanhNghiepColumns.IDDoanhNghiep.ToString(), "ASC", out total);
if (doanhnghiepcollection.Count > 0)
return doanhnghiepcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbDoanhNghiepBUS.cs
|
C#
|
gpl3
| 2,063
|
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Text;
using DAL;
using Entities;
/// <summary>
/// Summary description for tbChiTietDHBUS
/// </summary>
public class tbChiTietDHBUS
{
public static void Insert_ChiTietDH(tbChiTietDH chitietdh)
{
tbCTDonHangDAL chitietdhDAL = new tbCTDonHangDAL();
chitietdhDAL.Insert(chitietdh);
}
public static void Update_ChiTietDH(tbChiTietDH chitietdh)
{
tbCTDonHangDAL chitietdhDAL = new tbCTDonHangDAL();
chitietdhDAL.Update(chitietdh);
}
public static void Delete_ChiTietDH(int Id)
{
tbCTDonHangDAL chitietdhDAL = new tbCTDonHangDAL();
chitietdhDAL.Delete(Id);
}
public static tbChiTietDH.tbChiTietDHCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbCTDonHangDAL chitietdhDAL = new tbCTDonHangDAL();
return (chitietdhDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbChiTietDH.tbChiTietDHCollection GetAll()
{
int total = 0;
tbCTDonHangDAL chitietdhDAL = new tbCTDonHangDAL();
return chitietdhDAL.Get("Where 1=1", 0, 0, tbChiTietDH.tbChiTietDHColumns.IDCTDH.ToString(), "ASC", out total);
}
public static tbChiTietDH GetByID(int iD)
{
int total = 0;
tbCTDonHangDAL chitietdhDAL = new tbCTDonHangDAL();
tbChiTietDH.tbChiTietDHCollection chitietdhcollection = chitietdhDAL.Get("where " + tbChiTietDH.tbChiTietDHColumns.IDCTDH.ToString() + "=" + iD.ToString(), 0, 0, tbChiTietDH.tbChiTietDHColumns.IDCTDH.ToString(), "ASC", out total);
if (chitietdhcollection.Count > 0)
return chitietdhcollection[0];
return null;
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbChiTietDHBUS.cs
|
C#
|
gpl3
| 1,869
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbHangSanXuatBUS
{
public static void Insert_HangSanXuat(tbHangSanXuat hangsanxuat)
{
tbHangSanXuatDAL hangsanxuatDAL = new tbHangSanXuatDAL();
hangsanxuatDAL.Insert(hangsanxuat);
}
public static void Update_HangSanXuat(tbHangSanXuat hangsanxuat)
{
tbHangSanXuatDAL hangsanxuatDAL = new tbHangSanXuatDAL();
hangsanxuatDAL.Update(hangsanxuat);
}
public static void Delete_HangSanXuat(int iD)
{
tbHangSanXuatDAL hangsanxuatDAL = new tbHangSanXuatDAL();
hangsanxuatDAL.Delete(iD);
}
public static Entities.tbHangSanXuat.tbHangSanXuatCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbHangSanXuatDAL hangsanxuatDAL = new tbHangSanXuatDAL();
return hangsanxuatDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static Entities.tbHangSanXuat.tbHangSanXuatCollection GetAll()
{
int total = 0;
tbHangSanXuatDAL hangsanxuatDAL = new tbHangSanXuatDAL();
return hangsanxuatDAL.Get("where 1=1", 0, 0, Entities.tbHangSanXuat.tbHangSanXuatColumns.IDHangSanXuat.ToString(), "ASC", out total);
}
public static tbHangSanXuat GetByID(int iD)
{
int total = 0;
tbHangSanXuatDAL hangsanxuatDAL = new tbHangSanXuatDAL();
Entities.tbHangSanXuat.tbHangSanXuatCollection hangsanxuatCollection = hangsanxuatDAL.Get("where " + Entities.tbHangSanXuat.tbHangSanXuatColumns.IDHangSanXuat.ToString() + "=" + iD.ToString(), 0, 0, Entities.tbHangSanXuat.tbHangSanXuatColumns.IDHangSanXuat.ToString(), "ASC", out total);
if (hangsanxuatCollection.Count > 0)
return hangsanxuatCollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbHangSanXuatBUS.cs
|
C#
|
gpl3
| 2,107
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbDonHangBUS
{
public static void Insert_DonHang(tbDonHang donhang)
{
tbDonHangDAL donhangDAL = new tbDonHangDAL();
donhangDAL.Insert(donhang);
}
public static void Update_DonHang(tbDonHang donhang)
{
tbDonHangDAL donhangDAL = new tbDonHangDAL();
donhangDAL.Update(donhang);
}
public static void Delete_DonHang(int iD)
{
tbDonHangDAL donhangDAL = new tbDonHangDAL();
donhangDAL.Delete(iD);
}
public static Entities.tbDonHang.tbDonHangCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbDonHangDAL donhangDAL = new tbDonHangDAL();
return donhangDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static Entities.tbDonHang.tbDonHangCollection GetAll()
{
int total = 0;
tbDonHangDAL donhangDAL = new tbDonHangDAL();
return donhangDAL.Get("where 1=1", 0, 0, tbDonHang.tbDonHangColumns.IDDonHang.ToString(), "ASC", out total);
}
public static tbDonHang GetByID(int iD)
{
int total = 0;
tbDonHangDAL donhangDAL = new tbDonHangDAL();
tbDonHang.tbDonHangCollection donhangCollection = donhangDAL.Get("where " + tbDonHang.tbDonHangColumns.IDDonHang.ToString() + "=" + iD.ToString(), 0, 0, tbDonHang.tbDonHangColumns.IDDonHang.ToString(), "ASC", out total);
if (donhangCollection.Count > 0)
return donhangCollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbDonHangBUS.cs
|
C#
|
gpl3
| 1,859
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbTTGiaoDichBus
{
public static void Insert_ChuDe(tbTTGiaoDich ttgiaodich)
{
tbTTGiaoDichDAL ttgiaodichDAL = new tbTTGiaoDichDAL();
ttgiaodichDAL.Insert(ttgiaodich);
}
public static void Update_ChuDe(tbTTGiaoDich ttgiaodich)
{
tbTTGiaoDichDAL ttgiaodichDAL = new tbTTGiaoDichDAL();
ttgiaodichDAL.Update(ttgiaodich);
}
public static void Delete_ChuDe(int Id)
{
tbTTGiaoDichDAL ttgiaodichDAL = new tbTTGiaoDichDAL();
ttgiaodichDAL.Delete(Id);
}
public static tbTTGiaoDich.tbTTGiaoDichCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbTTGiaoDichDAL ttgiaodichDAL = new tbTTGiaoDichDAL();
return (ttgiaodichDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbTTGiaoDich.tbTTGiaoDichCollection GetAll()
{
int total = 0;
tbTTGiaoDichDAL ttgiaodichDAL = new tbTTGiaoDichDAL();
return ttgiaodichDAL.Get("Where 1=1", 0, 0, tbTTGiaoDich.tbTTGiaoDichColumns.IDTTGiaoDich.ToString(), "ASC", out total);
}
public static tbTTGiaoDich GetByID(int iD)
{
int total = 0;
tbTTGiaoDichDAL ttgiaodichDAL = new tbTTGiaoDichDAL();
tbTTGiaoDich.tbTTGiaoDichCollection ttgiaodichcollection = ttgiaodichDAL.Get("where " + tbTTGiaoDich.tbTTGiaoDichColumns.IDTTGiaoDich.ToString() + "=" + iD.ToString(), 0, 0, tbTTGiaoDich.tbTTGiaoDichColumns.IDTTGiaoDich.ToString(), "ASC", out total);
if (ttgiaodichcollection.Count > 0)
return ttgiaodichcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbTTGiaoDichBUS.cs
|
C#
|
gpl3
| 1,995
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BUS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CNTP")]
[assembly: AssemblyProduct("BUS")]
[assembly: AssemblyCopyright("Copyright © CNTP 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("78463d93-7ce7-402d-aa2b-54623a96983d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/Properties/AssemblyInfo.cs
|
C#
|
gpl3
| 1,385
|
using System;
using System.Collections.Generic;
using System.Text;
using Entities;
using DAL;
namespace BUS
{
public class tbTrangThaiSPBUS
{
public static void Insert_TrangThaiSP(tbTrangThaiSP trangthaisp)
{
tbTrangThaiSPDAL trangthaispDAL = new tbTrangThaiSPDAL();
trangthaispDAL.Insert(trangthaisp);
}
public static void Update_TrangThaiSP(tbTrangThaiSP trangthaisp)
{
tbTrangThaiSPDAL trangthaispDAL = new tbTrangThaiSPDAL();
trangthaispDAL.Update(trangthaisp);
}
public static void Delete_TrangThaiSP(int iD)
{
tbTrangThaiSPDAL trangthaispDAL = new tbTrangThaiSPDAL();
trangthaispDAL.Delete(iD);
}
public static tbTrangThaiSP.tbTrangThaiSPCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbTrangThaiSPDAL trangthaispDAL = new tbTrangThaiSPDAL();
return trangthaispDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static tbTrangThaiSP.tbTrangThaiSPCollection GetAll()
{
int total = 0;
tbTrangThaiSPDAL trangthaispDAL = new tbTrangThaiSPDAL();
return trangthaispDAL.Get("where 1=1", 0, 0, Entities.tbTrangThaiSP.tbTrangThaiSPColumns.IDTrangThaiSP.ToString(), "ASC", out total);
}
public static tbTrangThaiSP GetByID(int iD)
{
int total = 0;
tbTrangThaiSPDAL trangthaispDAL = new tbTrangThaiSPDAL();
tbTrangThaiSP.tbTrangThaiSPCollection trangthaispCollection = trangthaispDAL.Get("where " + tbTrangThaiSP.tbTrangThaiSPColumns.IDTrangThaiSP.ToString() + "=" + iD.ToString(), 0, 0, tbTrangThaiSP.tbTrangThaiSPColumns.IDTrangThaiSP.ToString(), "ASC", out total);
if (trangthaispCollection.Count > 0)
return trangthaispCollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbTrangThaiSPBUS.cs
|
C#
|
gpl3
| 2,062
|
using System;
using System.Collections.Generic;
using System.Text;
using Entities;
using DAL;
namespace BUS
{
public class tbKhachHangBUS
{
public static void Insert(tbKhachHang khachhang)
{
tbKhachHangDAL khachhangDAL = new tbKhachHangDAL();
khachhangDAL.Insert(khachhang);
}
public static void Update(tbKhachHang khachhang)
{
tbKhachHangDAL khachhangDAL = new tbKhachHangDAL();
khachhangDAL.Update(khachhang);
}
public static void Delete(int iD)
{
tbKhachHangDAL khachhangDAL = new tbKhachHangDAL();
khachhangDAL.Delete(iD);
}
public static tbKhachHang.tbKhachHangCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbKhachHangDAL khachhangDAL = new tbKhachHangDAL();
return khachhangDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static tbKhachHang.tbKhachHangCollection GetAll()
{
int total = 0;
tbKhachHangDAL khachhangDAL = new tbKhachHangDAL();
return khachhangDAL.Get("where 1=1", 0, 0, tbKhachHang.tbKhachHangColumns.IDKhachHang.ToString(), "ASC", out total);
}
public static tbKhachHang GetByID(int iD)
{
int total = 0;
tbKhachHangDAL khachhangDAL = new tbKhachHangDAL();
tbKhachHang.tbKhachHangCollection khachhangCollection = khachhangDAL.Get("where " + tbKhachHang.tbKhachHangColumns.IDKhachHang.ToString() + "=" + iD.ToString(), 0, 0, tbKhachHang.tbKhachHangColumns.IDKhachHang.ToString(), "ASC", out total);
if (khachhangCollection.Count > 0)
return khachhangCollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbKhachHangBUS.cs
|
C#
|
gpl3
| 1,917
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
using DAL;
namespace BUS
{
public class tbLoaiSPBUS
{
public static void Insert_LoaiSP(tbLoaiSP loaisp)
{
tbLoaiSPDAL loaispDAL = new tbLoaiSPDAL();
loaispDAL.Insert(loaisp);
}
public static void Update_LoaiSP(tbLoaiSP loaisp)
{
tbLoaiSPDAL loaispDAL = new tbLoaiSPDAL();
loaispDAL.Update(loaisp);
}
public static void Delete_LoaiSP(int iD)
{
tbLoaiSPDAL loaispDAL = new tbLoaiSPDAL();
loaispDAL.Delete(iD);
}
public static tbLoaiSP.tbLoaiSPCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbLoaiSPDAL loaispDAL = new tbLoaiSPDAL();
return loaispDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static Entities.tbLoaiSP.tbLoaiSPCollection GetAll()
{
int total = 0;
tbLoaiSPDAL loaispDAL = new tbLoaiSPDAL();
return loaispDAL.Get("where 1=1", 0, 0, Entities.tbLoaiSP.tbLoaiSPColumns.IDLoaiSP.ToString(), "ASC", out total);
}
public static tbLoaiSP GetByID(int iD)
{
int total = 0;
tbLoaiSPDAL loaispDAL = new tbLoaiSPDAL();
tbLoaiSP.tbLoaiSPCollection loaispCollection = loaispDAL.Get("where " + Entities.tbLoaiSP.tbLoaiSPColumns.IDLoaiSP.ToString() + "=" + iD.ToString(), 0, 0, Entities.tbLoaiSP.tbLoaiSPColumns.IDLoaiSP.ToString(), "ASC", out total);
if (loaispCollection.Count > 0)
return loaispCollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbLoaiSPBUS.cs
|
C#
|
gpl3
| 1,902
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbHTThanhToanBus
{
public static void Insert_HTThanhtoan(tbHTThanhToan htthanhtoan)
{
tbHTThanhToanDAL htthanhtoanDAL = new tbHTThanhToanDAL();
htthanhtoanDAL.Insert(htthanhtoan);
}
public static void Update_HTThanhtoan(tbHTThanhToan htthanhtoan)
{
tbHTThanhToanDAL htthanhtoanDAL = new tbHTThanhToanDAL();
htthanhtoanDAL.Update(htthanhtoan);
}
public static void Delete_HTThanhtoan(int Id)
{
tbHTThanhToanDAL htthanhtoanDAL = new tbHTThanhToanDAL();
htthanhtoanDAL.Delete(Id);
}
public static tbHTThanhToan.tbHTThanhToanCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbHTThanhToanDAL htthanhtoanDAL = new tbHTThanhToanDAL();
return (htthanhtoanDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbHTThanhToan.tbHTThanhToanCollection GetAll()
{
int total = 0;
tbHTThanhToanDAL htthanhtoanDAL = new tbHTThanhToanDAL();
return htthanhtoanDAL.Get("Where 1=1", 0, 0, tbHTThanhToan.tbHTThanhToanColumns.IDHinhThuc.ToString(), "ASC", out total);
}
public static tbHTThanhToan GetByID(int iD)
{
int total = 0;
tbHTThanhToanDAL htthanhtoanDAL = new tbHTThanhToanDAL();
tbHTThanhToan.tbHTThanhToanCollection htthanhtoancollection = htthanhtoanDAL.Get("where " + tbHTThanhToan.tbHTThanhToanColumns.IDHinhThuc.ToString() + "=" + iD.ToString(), 0, 0, tbHTThanhToan.tbHTThanhToanColumns.IDHinhThuc.ToString(), "ASC", out total);
if (htthanhtoancollection.Count > 0)
return htthanhtoancollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbHTThanhToanBUS.cs
|
C#
|
gpl3
| 2,054
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbHinhAnhBus
{
public static void Insert_HinhAnh(tbHinhAnh hinhanh)
{
tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL();
hinhanhDAL.Insert(hinhanh);
}
public static void Update_HinhAnh(tbHinhAnh hinhanh)
{
tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL();
hinhanhDAL.Update(hinhanh);
}
public static void Delete_HinhAnh(int Id)
{
tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL();
hinhanhDAL.Delete(Id);
}
public static tbHinhAnh.tbHinhAnhCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL();
return (hinhanhDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbHinhAnh.tbHinhAnhCollection GetAll()
{
int total = 0;
tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL();
return hinhanhDAL.Get("Where 1=1", 0, 0, tbHinhAnh.tbHinhAnhColumns.IDHinhAnh.ToString(), "ASC", out total);
}
public static tbHinhAnh GetByID(int iD)
{
int total = 0;
tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL();
tbHinhAnh.tbHinhAnhCollection hinhanhcollection = hinhanhDAL.Get("where " + tbHinhAnh.tbHinhAnhColumns.IDHinhAnh.ToString() + "=" + iD.ToString(), 0, 0, tbHinhAnh.tbHinhAnhColumns.IDHinhAnh.ToString(), "ASC", out total);
if (hinhanhcollection.Count > 0)
return hinhanhcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbHinhAnhBUS.cs
|
C#
|
gpl3
| 1,851
|
using System;
using System.Collections.Generic;
using System.Text;
using Entities;
using DAL;
using System.Data.SqlClient;
namespace BUS
{
public class tbTTDonHangBus
{
public static void Insert_ChuDe(tbTTDonHang ttdonhang)
{
tbTTDonHangDAL ttdonhangDAL = new tbTTDonHangDAL();
ttdonhangDAL.Insert(ttdonhang);
}
public static void Update_ChuDe(tbTTDonHang ttdonhang)
{
tbTTDonHangDAL ttdonhangDAL = new tbTTDonHangDAL();
ttdonhangDAL.Update(ttdonhang);
}
public static void Delete_ChuDe(int Id)
{
tbTTDonHangDAL ttdonhangDAL = new tbTTDonHangDAL();
ttdonhangDAL.Delete(Id);
}
public static tbTTDonHang.tbTTDonHangCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbTTDonHangDAL ttdonhangDAL = new tbTTDonHangDAL();
return (ttdonhangDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbTTDonHang.tbTTDonHangCollection GetAll()
{
int total = 0;
tbTTDonHangDAL ttdonhangDAL = new tbTTDonHangDAL();
return ttdonhangDAL.Get("Where 1=1", 0, 0, tbTTDonHang.tbTTDonHangColumns.IDTTDonHang.ToString(), "ASC", out total);
}
public static tbTTDonHang GetByID(int iD)
{
int total = 0;
tbTTDonHangDAL ttdonhangDAL = new tbTTDonHangDAL();
tbTTDonHang.tbTTDonHangCollection ttdonhangcollection = ttdonhangDAL.Get("where " + tbTTDonHang.tbTTDonHangColumns.IDTTDonHang.ToString() + "=" + iD.ToString(), 0, 0, tbTTDonHang.tbTTDonHangColumns.IDTTDonHang.ToString(), "ASC", out total);
if (ttdonhangcollection.Count > 0)
return ttdonhangcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbTTDonHangBUS.cs
|
C#
|
gpl3
| 1,975
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbSanPhamBus
{
public static void Insert_SanPham(tbSanPham sanpham)
{
tbsanphamDAL sanphamDAL = new tbsanphamDAL();
sanphamDAL.Insert(sanpham);
}
public static void Update_SanPham(tbSanPham sanpham)
{
tbsanphamDAL sanphamDAL = new tbsanphamDAL();
sanphamDAL.Update(sanpham);
}
public static void Delete_SanPham(int Id)
{
tbsanphamDAL sanphamDAL = new tbsanphamDAL();
sanphamDAL.Delete(Id);
}
public static tbSanPham.tbSanPhamCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbsanphamDAL sanphamDAL = new tbsanphamDAL();
return (sanphamDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbSanPham.tbSanPhamCollection GetAll()
{
int total = 0;
tbsanphamDAL sanphamDAL = new tbsanphamDAL();
return sanphamDAL.Get("Where 1=1", 0, 0, tbSanPham.tbSanPhamColumns.IDSanPham.ToString(), "ASC", out total);
}
public static tbSanPham GetByID(int iD)
{
int total = 0;
tbsanphamDAL sanphamDAL = new tbsanphamDAL();
tbSanPham.tbSanPhamCollection sanphamcollection = sanphamDAL.Get("where " + tbSanPham.tbSanPhamColumns.IDSanPham.ToString() + "=" + iD.ToString(), 0, 0, tbSanPham.tbSanPhamColumns.IDSanPham.ToString(), "ASC", out total);
if (sanphamcollection.Count > 0)
return sanphamcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbSanPhamBUS.cs
|
C#
|
gpl3
| 1,851
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbMaSoSPBUS
{
public static void Insert_MaSoSP(tbMaSoSP masosp)
{
tbMaSoSPDAL masospDAL = new tbMaSoSPDAL();
masospDAL.Insert(masosp);
}
public static void Update_MaSoSP(tbMaSoSP masosp)
{
tbMaSoSPDAL masospDAL = new tbMaSoSPDAL();
masospDAL.Update(masosp);
}
public static void Delete_MaSoSP(int Id)
{
tbMaSoSPDAL masospDAL = new tbMaSoSPDAL();
masospDAL.Delete(Id);
}
public static tbMaSoSP.tbMaSoSPCollection Get(string Where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbMaSoSPDAL masospDAL = new tbMaSoSPDAL();
return (masospDAL.Get(Where, pageindex, pagesize, orderby, orderdirection, out total));
}
public static tbMaSoSP.tbMaSoSPCollection GetAll()
{
int total = 0;
tbMaSoSPDAL masospDAL = new tbMaSoSPDAL();
return masospDAL.Get("Where 1=1", 0, 0, tbMaSoSP.tbMaSoSPColumns.IDMSSP.ToString(), "ASC", out total);
}
public static tbMaSoSP GetByID(int iD)
{
int total = 0;
tbMaSoSPDAL masospDAL = new tbMaSoSPDAL();
tbMaSoSP.tbMaSoSPCollection masospcollection = masospDAL.Get("where " + tbMaSoSP.tbMaSoSPColumns.IDMSSP.ToString() + "=" + iD.ToString(), 0, 0, tbMaSoSP.tbMaSoSPColumns.IDMSSP.ToString(), "ASC", out total);
if (masospcollection.Count > 0)
return masospcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbMaSoSPBUS.cs
|
C#
|
gpl3
| 1,792
|
using System;
using System.Collections.Generic;
using System.Text;
using Entities;
using DAL;
using System.Data.SqlClient;
namespace BUS
{
public class tbNhanVienBUS
{
public static void Insert(tbNhanVien nhanvien)
{
tbNhanVienDAL nhanvienDAL = new tbNhanVienDAL();
nhanvienDAL.Insert(nhanvien);
}
public static void Update(tbNhanVien nhanvien)
{
tbNhanVienDAL nhanvienDAL = new tbNhanVienDAL();
nhanvienDAL.Update(nhanvien);
}
public static void Delete(int iD)
{
tbNhanVienDAL nhanvienDAL = new tbNhanVienDAL();
nhanvienDAL.Delete(iD);
}
public static Entities.tbNhanVien.tbNhanVienCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbNhanVienDAL nhanvienDAL = new tbNhanVienDAL();
return nhanvienDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static Entities.tbNhanVien.tbNhanVienCollection GetAll()
{
int total = 0;
tbNhanVienDAL nhanvienDAL = new tbNhanVienDAL();
return nhanvienDAL.Get("where 1=1", 0, 0, tbNhanVien.tbNhanVienColumns.IDNhanVien.ToString(), "ASC", out total);
}
public static tbNhanVien GetByID(int iD)
{
int total = 0;
tbNhanVienDAL nhanvienDAL = new tbNhanVienDAL();
tbNhanVien.tbNhanVienCollection nhanvienCollection = nhanvienDAL.Get("where " + tbNhanVien.tbNhanVienColumns.IDNhanVien.ToString() + "=" + iD.ToString(), 0, 0, tbNhanVien.tbNhanVienColumns.IDNhanVien.ToString(), "ASC", out total);
if (nhanvienCollection.Count > 0)
return nhanvienCollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbNhanVienBUS.cs
|
C#
|
gpl3
| 1,917
|
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using Entities;
namespace BUS
{
public class tbDiaDiemBUS
{
public static void Insert_Diadiem(tbDiaDiem diadiem)
{
tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL();
diadiemDAL.Insert(diadiem);
}
public static void Update_DiaDiem(tbDiaDiem diadiem)
{
tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL();
diadiemDAL.Update(diadiem);
}
public static void Delete_DiaDiem(int iD)
{
tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL();
diadiemDAL.Delete(iD);
}
public static tbDiaDiem.tbDiaDiemCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total)
{
tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL();
return diadiemDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total);
}
public static tbDiaDiem.tbDiaDiemCollection GetAll()
{
int total = 0;
tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL();
return diadiemDAL.Get("where 1=1", 0, 0, tbDiaDiem.tbDiaDiemColumns.IDDiaDiem.ToString(), "ASC", out total);
}
public static tbDiaDiem GetByID(int iD)
{
int total = 0;
tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL();
tbDiaDiem.tbDiaDiemCollection diadiemcollection = diadiemDAL.Get("where " + tbDiaDiem.tbDiaDiemColumns.IDDiaDiem.ToString() + "=" + iD.ToString(), 0, 0, tbDiaDiem.tbDiaDiemColumns.IDDiaDiem.ToString(), "ASC", out total);
if (diadiemcollection.Count > 0)
return diadiemcollection[0];
return null;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/BUS/tbDiaDiemBUS.cs
|
C#
|
gpl3
| 1,841
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbTTGiaoDich
{
private int idTTGiaoDich;
public int IDTTGiaoDich
{
get { return idTTGiaoDich; }
set { idTTGiaoDich = value; }
}
private int idDonHang;
public int IDDonHang
{
get { return idDonHang; }
set { idDonHang = value; }
}
private int idHinhThuc;
public int IDHinhThuc
{
get { return idHinhThuc; }
set { idHinhThuc = value; }
}
private int thanhTien;
public int ThanhTien
{
get { return thanhTien; }
set { thanhTien = value; }
}
public enum tbTTGiaoDichColumns
{
IDTTGiaoDich,
IDDonHang,
IDHinhThuc,
ThanhTien
}
public class tbTTGiaoDichCollection : List<tbTTGiaoDich> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbTTGiaoDich.cs
|
C#
|
gpl3
| 1,045
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbSanPham
{
private int idSanPham;
public int IDSanPham
{
get { return idSanPham; }
set { idSanPham = value; }
}
private string tenSanPham;
public string TenSanPham
{
get { return tenSanPham; }
set { tenSanPham = value; }
}
private string idLoaiSP;
public string IDLoaiSP
{
get { return idLoaiSP; }
set { idLoaiSP = value; }
}
private int idDiaDiem;
public int IDDiaDiem
{
get { return idDiaDiem; }
set { idDiaDiem = value; }
}
private string idHangSanXuat;
public string IDHangSanXuat
{
get { return idHangSanXuat; }
set { idHangSanXuat = value; }
}
private int giaBan;
public int GiaBan
{
get { return giaBan; }
set { giaBan = value; }
}
private int giaTriThuc;
public int GiaTriThuc
{
get { return giaTriThuc; }
set { giaTriThuc = value; }
}
private string dieuKienSuDung;
public string DieuKienSuDung
{
get { return dieuKienSuDung; }
set { dieuKienSuDung = value; }
}
private string moTaSP;
public string MoTaSP
{
get { return moTaSP; }
set { moTaSP = value; }
}
private int soLuongSP;
public int SoLuongSP
{
get { return soLuongSP; }
set { soLuongSP = value; }
}
private int soLuongBan;
public int SoLuongBan
{
get { return soLuongBan; }
set { soLuongBan = value; }
}
private int soLuongDaBan;
public int SoLuongDaBan
{
get { return soLuongDaBan; }
set { soLuongDaBan = value; }
}
private int idTrangThaiSP;
public int IDTrangThaiSP
{
get { return idTrangThaiSP; }
set { idTrangThaiSP = value; }
}
private DateTime ngayBDBan;
public DateTime NgayBDBan
{
get { return ngayBDBan; }
set { ngayBDBan = value; }
}
private DateTime ngayKTBan;
public DateTime NgayKTBan
{
get { return ngayKTBan; }
set { ngayKTBan = value; }
}
private DateTime ngayCapNhat;
public DateTime NgayCapNhat
{
get { return ngayCapNhat; }
set { ngayCapNhat = value; }
}
private string idNhanVien;
public string IDNhanVien
{
get { return idNhanVien; }
set { idNhanVien = value; }
}
private string idDoanhNghiep;
public string IDDoanhNghiep
{
get { return idDoanhNghiep; }
set { idDoanhNghiep = value; }
}
private float tiLeHoaHong;
public float TiLeHoaHong
{
get { return tiLeHoaHong; }
set { tiLeHoaHong = value; }
}
public enum tbSanPhamColumns
{
IDSanPham,
TenSanPham,
IDLoaiSP,
IDDiaDiem,
IDHangSanXuat,
GiaBan,
GiaTriThuc,
DieuKienSuDung,
MoTaSp,
SoLuongSP,
SoLuongBan,
SoLuongDaBan,
IDTrangThaiSP,
NgayBDBan,
NgayKTBan,
NgayCapNhat,
IDNhanVien,
IDDoanhNghiep,
TiLeHoaHong
}
public class tbSanPhamCollection : List<tbSanPham> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbSanPham.cs
|
C#
|
gpl3
| 3,997
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbHangSanXuat
{
private int idHangSanXuat;
public int IDHangSanXuat
{
get { return idHangSanXuat; }
set { idHangSanXuat = value; }
}
private string tenHangSanXuat;
public string TenHangSanXuat
{
get { return tenHangSanXuat; }
set { tenHangSanXuat = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbHangSanXuatColumns
{
IDHangSanXuat,
TenHangSanXuat,
DiaChi,
DienThoai,
Email
}
public class tbHangSanXuatCollection : List<tbHangSanXuat> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbHangSanXuat.cs
|
C#
|
gpl3
| 1,242
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbTTDonHang
{
private int idTTDonHang;
public int IDTTDonHang
{
get { return idTTDonHang; }
set { idTTDonHang = value; }
}
private string trangThaiDH;
public string TrangThaiDH
{
get { return trangThaiDH; }
set { trangThaiDH = value; }
}
public enum tbTTDonHangColumns
{
IDTTDonHang,
TrangThaiDH
}
public class tbTTDonHangCollection : List<tbTTDonHang> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbTTDonHang.cs
|
C#
|
gpl3
| 671
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbHinhAnh
{
private int idHinhAnh;
public int IDHinhAnh
{
get { return idHinhAnh; }
set { idHinhAnh = value; }
}
private int idSanPham;
public int IDSanPham
{
get { return idSanPham; }
set { idSanPham = value; }
}
private string tenHinh;
public string TenHinh
{
get { return tenHinh; }
set { tenHinh = value; }
}
public enum tbHinhAnhColumns
{
IDHinhAnh,
IDSanPham,
TenHinh
}
public class tbHinhAnhCollection : List<tbHinhAnh> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbHinhAnh.cs
|
C#
|
gpl3
| 820
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbTrangThaiSP
{
private int idTrangThaiSP;
public int IDTrangThaiSP
{
get { return idTrangThaiSP; }
set { idTrangThaiSP = value; }
}
private string trangThai;
public string TrangThai
{
get { return trangThai; }
set { trangThai = value; }
}
public enum tbTrangThaiSPColumns
{
IDTrangThaiSP,
TrangThai
}
public class tbTrangThaiSPCollection : List<tbTrangThaiSP> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbTrangThaiSP.cs
|
C#
|
gpl3
| 679
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbDiaDiem
{
private int idDiaDiem;
public int IDDiaDiem
{
get { return idDiaDiem; }
set { idDiaDiem = value; }
}
private string diaDiem;
public string DiaDiem
{
get { return diaDiem; }
set { diaDiem = value; }
}
public enum tbDiaDiemColumns
{
IDDiaDiem,
DiaDiem
}
public class tbDiaDiemCollection : List<tbDiaDiem> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbDiaDiem.cs
|
C#
|
gpl3
| 625
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbLoaiSP
{
private int idLoaiSP;
public int IDLoaiSP
{
get { return idLoaiSP; }
set { idLoaiSP = value; }
}
private string tenLoaiSP;
public string TenLoaiSP
{
get { return tenLoaiSP; }
set { tenLoaiSP = value; }
}
public enum tbLoaiSPColumns
{
IDLoaiSP,
TenLoaiSP
}
public class tbLoaiSPCollection : List<tbLoaiSP> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbLoaiSP.cs
|
C#
|
gpl3
| 615
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbHTThanhToan
{
private int idHinhThuc;
public int IDHinhThuc
{
get { return idHinhThuc; }
set { idHinhThuc = value; }
}
private string tenHinhThuc;
public string TenHinhThuc
{
get { return tenHinhThuc; }
set { tenHinhThuc = value; }
}
public enum tbHTThanhToanColumns
{
IDHinhThuc,
TenHinhThuc
}
public class tbHTThanhToanCollection : List<tbHTThanhToan> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbHTThanhToan.cs
|
C#
|
gpl3
| 675
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbChiTietDH
{
private int idCTDH;
public int IDCTDH
{
get { return idCTDH; }
set { idCTDH = value; }
}
private int idSanPham;
public int IDSanPham
{
get { return idSanPham; }
set { idSanPham = value; }
}
private int idDonHang;
public int IDDonHang
{
get { return idDonHang; }
set { idDonHang = value; }
}
private int soLuong;
public int SoLuong
{
get { return soLuong; }
set { soLuong = value; }
}
private int donGia;
public int DonGia
{
get { return donGia; }
set { donGia = value; }
}
private int thanhTien;
public int ThanhTien
{
get { return thanhTien; }
set { thanhTien = value; }
}
public enum tbChiTietDHColumns
{
IDCTDH,
IDSanPham,
IDDonHang,
SoLuong,
DonGia,
ThanhTien
}
public class tbChiTietDHCollection : List <tbChiTietDH >{}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbChiTietDH.cs
|
C#
|
gpl3
| 1,354
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Entities")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CNTP")]
[assembly: AssemblyProduct("Entities")]
[assembly: AssemblyCopyright("Copyright © CNTP 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ac5e8f46-d541-47a8-8958-bb77e756ab42")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/Properties/AssemblyInfo.cs
|
C#
|
gpl3
| 1,395
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbDonHang
{
private int idDonHang;
public int IDDonHang
{
get { return idDonHang; }
set { idDonHang = value; }
}
private int idKhachHang;
public int IDKhachHang
{
get { return idKhachHang; }
set { idKhachHang = value; }
}
private DateTime ngayDH;
public DateTime NgayDH
{
get { return ngayDH; }
set { ngayDH = value; }
}
private int idTTDonHang;
public int IDTTDonHang
{
get { return idTTDonHang; }
set { idTTDonHang = value; }
}
private int triGia;
public int TriGia
{
get { return triGia; }
set { triGia = value; }
}
private DateTime ngayGiaoHang;
public DateTime NgayGiaoHang
{
get { return ngayGiaoHang; }
set { ngayGiaoHang = value; }
}
public enum tbDonHangColumns
{
IDDonHang,
IDKhachHang,
NgayDH,
IDTTDonHang,
TriGia,
NgayGiaoHang
}
public class tbDonHangCollection : List<tbDonHang> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbDonHang.cs
|
C#
|
gpl3
| 1,410
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbDoanhNghiep
{
private int idDoanhNghiep;
public int IDDoanhNghiep
{
get { return idDoanhNghiep; }
set { idDoanhNghiep = value; }
}
private string tenDoanhNghiep;
public string TenDoanhNghiep
{
get { return tenDoanhNghiep; }
set { tenDoanhNghiep = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbDoanhNghiepColumns
{
IDDoanhNghiep,
TenDoanhNghiep,
DiaChi,
DienThoai,
Email
}
public class tbDoanhNghiepCollection : List<tbDoanhNghiep> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbDoanhNghiep.cs
|
C#
|
gpl3
| 1,202
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbMaSoSP
{
private int idMSSP;
public int IDMSSP
{
get { return idMSSP; }
set { idMSSP = value; }
}
private int idCTDH;
public int IDCTDH
{
get { return idCTDH; }
set { idCTDH = value; }
}
private int maSo;
public int MaSo
{
get { return maSo; }
set { maSo = value; }
}
private string trangThai ;
public string TrangThai
{
get { return trangThai ; }
set { trangThai = value; }
}
public enum tbMaSoSPColumns
{
IDMSSP,
IDCTDH,
MaSo,
TrangThai
}
public class tbMaSoSPCollection : List<tbMaSoSP> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbMaSoSP.cs
|
C#
|
gpl3
| 962
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbNhanVien
{
private int idNhanVien;
public int IDNhanVien
{
get { return idNhanVien; }
set { idNhanVien = value; }
}
private string tenNV;
public string TenNV
{
get { return tenNV; }
set { tenNV = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbNhanVienColumns
{
IDNhanVien,
TenNV,
DiaChi,
DienThoai,
Email
}
public class tbNhanVienCollection : List<tbNhanVien> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbNhanVien.cs
|
C#
|
gpl3
| 1,170
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Entities
{
public class tbKhachHang
{
private int idKhachHang;
public int IDKhachHang
{
get { return idKhachHang; }
set { idKhachHang = value; }
}
private string tenKH;
public string TenKH
{
get { return tenKH; }
set { tenKH = value; }
}
private string diaChi;
public string DiaChi
{
get { return diaChi; }
set { diaChi = value; }
}
private int dienThoai;
public int DienThoai
{
get { return dienThoai; }
set { dienThoai = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
public enum tbKhachHangColumns
{
IDKhachHang,
TenKH,
DiaChi,
DienThoai,
Email
}
public class tbKhachHangCollection : List<tbKhachHang> { }
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Entities/tbKhachHang.cs
|
C#
|
gpl3
| 1,179
|
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Default.aspx.cs
|
C#
|
gpl3
| 380
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/Default.aspx
|
ASP.NET
|
gpl3
| 446
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbLoaiSPDAL
{
private SqlConnection cn = null;
public tbLoaiSPDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbLoaiSP lsp)
{
SqlCommand cm = new SqlCommand("LoaiSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenLoaiSP ", lsp.TenLoaiSP);
cm.ExecuteNonQuery();
}
public void Update(tbLoaiSP lsp)
{
SqlCommand cm = new SqlCommand("LoaiSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenLoaiSP ", lsp.TenLoaiSP);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("LoaiSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDLoaiSP ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbLoaiSP.tbLoaiSPCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("LoaiSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbLoaiSP.tbLoaiSPCollection lspcollection = new tbLoaiSP.tbLoaiSPCollection();
while (dr.Read())
{
tbLoaiSP lsp = new tbLoaiSP();
lsp.IDLoaiSP = int.Parse (dr.GetValue(0).ToString());
lsp.TenLoaiSP = dr.GetValue(1).ToString();
lspcollection.Add(lsp);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return lspcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbLoaiSPDAL.cs
|
C#
|
gpl3
| 2,800
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbHangSanXuatDAL
{
private SqlConnection cn = null;
public tbHangSanXuatDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbHangSanXuat HangSanXuat)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenHangSanXuat ", HangSanXuat.TenHangSanXuat);
cm.Parameters.AddWithValue("@DiaChi", HangSanXuat.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", HangSanXuat.DienThoai);
cm.Parameters.AddWithValue("@Email", HangSanXuat.Email);
cm.ExecuteNonQuery();
}
public void Update(tbHangSanXuat HangSanXuat)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHangSanXuat ", HangSanXuat.IDHangSanXuat);
cm.Parameters.AddWithValue("@TenHangSanXuat", HangSanXuat.TenHangSanXuat);
cm.Parameters.AddWithValue("@DiaChi", HangSanXuat.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", HangSanXuat.DienThoai);
cm.Parameters.AddWithValue("@Email", HangSanXuat.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHangSanXuat ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbHangSanXuat.tbHangSanXuatCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("HangSanXuat_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbHangSanXuat.tbHangSanXuatCollection HangSanXuatcollection = new tbHangSanXuat.tbHangSanXuatCollection();
while (dr.Read())
{
tbHangSanXuat HangSanXuat = new tbHangSanXuat();
HangSanXuat.IDHangSanXuat =int.Parse (dr.GetValue(0).ToString());
HangSanXuat.TenHangSanXuat = dr.GetValue(1).ToString();
HangSanXuat.DiaChi = dr.GetValue(2).ToString();
HangSanXuat.DienThoai = int.Parse(dr.GetValue(3).ToString());
HangSanXuat.Email = dr.GetValue(4).ToString();
HangSanXuatcollection.Add(HangSanXuat);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return HangSanXuatcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbHangSanXuatDAL.cs
|
C#
|
gpl3
| 3,694
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbDoanhNghiepDAL
{
private SqlConnection cn = null;
public tbDoanhNghiepDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbDoanhNghiep dn)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenDoanhNghiep ", dn.TenDoanhNghiep);
cm.Parameters.AddWithValue("@DiaChi", dn.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", dn.DienThoai);
cm.Parameters.AddWithValue("@Email", dn.Email);
cm.ExecuteNonQuery();
}
public void Update(tbDoanhNghiep dn)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenDoanhNghiep ", dn.TenDoanhNghiep);
cm.Parameters.AddWithValue("@DiaChi", dn.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", dn.DienThoai);
cm.Parameters.AddWithValue("@Email", dn.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDoanhNghiep ", Id);
cm.ExecuteNonQuery();
}
public tbDoanhNghiep.tbDoanhNghiepCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("DoanhNghiep_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbDoanhNghiep.tbDoanhNghiepCollection dncollection = new tbDoanhNghiep.tbDoanhNghiepCollection();
while (dr.Read())
{
tbDoanhNghiep dn = new tbDoanhNghiep();
dn.IDDoanhNghiep = int.Parse(dr.GetValue(0).ToString());
dn.TenDoanhNghiep = dr.GetValue(1).ToString();
dn.DiaChi = dr.GetValue(2).ToString();
dn.DienThoai =int.Parse ( dr.GetValue(3).ToString());
dn.Email = dr.GetValue(4).ToString();
dncollection.Add(dn);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return dncollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbDoanhNghiepDAL.cs
|
C#
|
gpl3
| 3,392
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class tbDiaDiemDAL
{
private SqlConnection cn = null;
public tbDiaDiemDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbDiaDiem dd)
{
SqlCommand cm = new SqlCommand("MaSoSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@DiaDiem ", dd.DiaDiem);
cm.ExecuteNonQuery();
}
public void Update(tbDiaDiem dd)
{
SqlCommand cm = new SqlCommand("MaSoSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@DiaDiem ", dd.DiaDiem);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("MaSoSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDiaDiem ", Id);
cm.ExecuteNonQuery();
}
public tbDiaDiem.tbDiaDiemCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("MaSoSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbDiaDiem.tbDiaDiemCollection ddcollection = new tbDiaDiem.tbDiaDiemCollection();
while (dr.Read())
{
tbDiaDiem dd = new tbDiaDiem();
dd.IDDiaDiem = int.Parse(dr.GetValue(0).ToString());
dd.DiaDiem = dr.GetValue(1).ToString();
ddcollection.Add(dd);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ddcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbDiaDiemDAL.cs
|
C#
|
gpl3
| 2,725
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbTrangThaiSPDAL
{
private SqlConnection cn = null;
public tbTrangThaiSPDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbTrangThaiSP ttsp)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThai ", ttsp.TrangThai);
cm.ExecuteNonQuery();
}
public void Update(tbTrangThaiSP ttsp)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThai ", ttsp.TrangThai);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDTrangThaiSP ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbTrangThaiSP.tbTrangThaiSPCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("TrangThaiSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbTrangThaiSP.tbTrangThaiSPCollection ttspcollection = new tbTrangThaiSP.tbTrangThaiSPCollection();
while (dr.Read())
{
tbTrangThaiSP ttsp = new tbTrangThaiSP();
ttsp.IDTrangThaiSP = int.Parse(dr.GetValue(0).ToString());
ttsp.TrangThai = dr.GetValue(1).ToString();
ttspcollection.Add(ttsp);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ttspcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbTrangThaiSPDAL.cs
|
C#
|
gpl3
| 2,903
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class tbHTThanhToanDAL
{
private SqlConnection cn = null;
public tbHTThanhToanDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbHTThanhToan hhtt)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenHinhThuc ", hhtt.TenHinhThuc);
cm.ExecuteNonQuery();
}
public void Update(tbHTThanhToan hhtt)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenHinhThuc ", hhtt.TenHinhThuc);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHinhThuc ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbHTThanhToan.tbHTThanhToanCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("HTThanhToan_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbHTThanhToan.tbHTThanhToanCollection nvcollection = new tbHTThanhToan.tbHTThanhToanCollection();
while (dr.Read())
{
tbHTThanhToan httt = new tbHTThanhToan();
httt.IDHinhThuc = int.Parse(dr.GetValue(0).ToString());
httt.TenHinhThuc = dr.GetValue(1).ToString();
nvcollection.Add(httt);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return nvcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbHTThanhToannDAL.cs
|
C#
|
gpl3
| 2,916
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data.SqlClient;
using Entities;
namespace DAL
{
public class tbKhachHangDAL
{
private SqlConnection cn = null;
public tbKhachHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbKhachHang kh)
{
SqlCommand cm = new SqlCommand("KhachHang_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenKH", kh.TenKH);
cm.Parameters.AddWithValue("@DiaChi", kh.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", kh.DienThoai);
cm.Parameters.AddWithValue("@Email", kh.Email);
cm.ExecuteNonQuery();
}
public void Update(tbKhachHang kh)
{
SqlCommand cm = new SqlCommand("KhachHang_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenKH", kh.TenKH);
cm.Parameters.AddWithValue("@DiaChi", kh.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", kh.DienThoai);
cm.Parameters.AddWithValue("@Email", kh.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("KhachHang_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDKhachHang", Id);
cm.ExecuteNonQuery();
}
public Entities.tbKhachHang.tbKhachHangCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("sp_tbKhachHang_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbKhachHang.tbKhachHangCollection khcollection = new tbKhachHang.tbKhachHangCollection();
while (dr.Read())
{
tbKhachHang kh = new tbKhachHang();
kh.IDKhachHang = int.Parse(dr.GetValue(0).ToString());
kh.TenKH = dr.GetValue(1).ToString();
kh.DiaChi = dr.GetValue(2).ToString();
kh.DienThoai =int.Parse ( dr.GetValue(3).ToString());
kh.Email = dr.GetValue(4).ToString();
khcollection.Add(kh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return khcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbKhachHangDAL.cs
|
C#
|
gpl3
| 3,383
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbDonHangDAL
{
private SqlConnection cn = null;
public tbDonHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbDonHang donhang)
{
SqlCommand cm = new SqlCommand("DonHang_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", donhang.IDDonHang);
cm.Parameters.AddWithValue("@IDKhachHang ", donhang.IDKhachHang);
cm.Parameters.AddWithValue("@NgayDH ", donhang.NgayDH);
cm.Parameters.AddWithValue("@IDTTDonHang ", donhang.IDTTDonHang);
cm.Parameters.AddWithValue("@TriGia ", donhang.TriGia);
cm.Parameters.AddWithValue("@NgayGiaoHang ", donhang.NgayGiaoHang);
cm.ExecuteNonQuery();
}
public void Update(tbDonHang donhang)
{
SqlCommand cm = new SqlCommand("DonHang_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", donhang.IDDonHang);
cm.Parameters.AddWithValue("@IDKhachHang ", donhang.IDKhachHang);
cm.Parameters.AddWithValue("@NgayDH ", donhang.NgayDH);
cm.Parameters.AddWithValue("@IDTTDonHang ", donhang.IDTTDonHang);
cm.Parameters.AddWithValue("@TriGia ", donhang.TriGia);
cm.Parameters.AddWithValue("@NgayGiaoHang ", donhang.NgayGiaoHang);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("DonHang_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@MaDH", Id);
cm.ExecuteNonQuery();
}
public tbDonHang.tbDonHangCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("DonHang_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbDonHang.tbDonHangCollection dhcollection = new tbDonHang.tbDonHangCollection();
while (dr.Read())
{
tbDonHang dh = new tbDonHang();
dh.IDDonHang = int.Parse(dr.GetValue(0).ToString());
dh.IDKhachHang = int.Parse(dr.GetValue(1).ToString());
dh.NgayDH = DateTime.Parse(dr.GetValue(2).ToString());
dh.IDTTDonHang = int.Parse(dr.GetValue(3).ToString());
dh.TriGia = int.Parse(dr.GetValue(4).ToString());
dh.NgayGiaoHang = DateTime.Parse(dr.GetValue(5).ToString());
dhcollection.Add(dh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return dhcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbDonHangDAL.cs
|
C#
|
gpl3
| 3,798
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbMaSoSPDAL
{
private SqlConnection cn = null;
public tbMaSoSPDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbMaSoSP mssp)
{
SqlCommand cm = new SqlCommand("MaSoSP_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDCTDH ", mssp.IDCTDH);
cm.Parameters.AddWithValue("@MaSo ", mssp.MaSo);
cm.Parameters.AddWithValue("@TrangThai ", mssp.TrangThai);
cm.ExecuteNonQuery();
}
public void Update(tbMaSoSP mssp)
{
SqlCommand cm = new SqlCommand("MaSoSP_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDMSSP ", mssp.IDMSSP);
cm.Parameters.AddWithValue("@IDCTDH ", mssp.IDCTDH);
cm.Parameters.AddWithValue("@MaSo ", mssp.MaSo);
cm.Parameters.AddWithValue("@TrangThai ", mssp.TrangThai);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("MaSoSP_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDMSSP ", Id);
cm.ExecuteNonQuery();
}
public tbMaSoSP.tbMaSoSPCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("MaSoSP_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbMaSoSP.tbMaSoSPCollection msspcollection = new tbMaSoSP.tbMaSoSPCollection();
while (dr.Read())
{
tbMaSoSP mssp = new tbMaSoSP();
mssp.IDMSSP = int.Parse(dr.GetValue(0).ToString());
mssp.IDCTDH = int.Parse (dr.GetValue(1).ToString());
mssp.MaSo = int.Parse (dr.GetValue(1).ToString());
msspcollection.Add(mssp);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return msspcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbMaSoSPDAL.cs
|
C#
|
gpl3
| 3,139
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbTTGiaoDichDAL
{
private SqlConnection cn = null;
public tbTTGiaoDichDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbTTGiaoDich ttgd)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", ttgd.IDDonHang);
cm.Parameters.AddWithValue("@IDHinhThuc ", ttgd.IDHinhThuc);
cm.Parameters.AddWithValue("@ThanhTien ", ttgd.ThanhTien);
cm.ExecuteNonQuery();
}
public void Update(tbTTGiaoDich ttgd)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDDonHang ", ttgd.IDDonHang);
cm.Parameters.AddWithValue("@IDHinhThuc ", ttgd.IDHinhThuc);
cm.Parameters.AddWithValue("@ThanhTien ", ttgd.ThanhTien);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDTTGiaoDich ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbTTGiaoDich.tbTTGiaoDichCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("TTGiaoDich_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbTTGiaoDich.tbTTGiaoDichCollection ttgdcollection = new tbTTGiaoDich.tbTTGiaoDichCollection();
while (dr.Read())
{
tbTTGiaoDich ttgd = new tbTTGiaoDich();
ttgd.IDTTGiaoDich = int.Parse(dr.GetValue(0).ToString());
ttgd.IDDonHang = int.Parse(dr.GetValue(1).ToString());
ttgd.IDHinhThuc = int.Parse(dr.GetValue(2).ToString());
ttgd.ThanhTien = int.Parse(dr.GetValue(3).ToString());
ttgdcollection.Add(ttgd);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ttgdcollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbTTGiaoDichDAL.cs
|
C#
|
gpl3
| 3,263
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DAL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CNTP")]
[assembly: AssemblyProduct("DAL")]
[assembly: AssemblyCopyright("Copyright © CNTP 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c2769ca7-a6c0-4fe5-b671-0a8930051d02")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/Properties/AssemblyInfo.cs
|
C#
|
gpl3
| 1,385
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Entities;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class tbsanphamDAL
{
private SqlConnection cn = null;
public tbsanphamDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbSanPham sanpham)
{
SqlCommand cm = new SqlCommand("SanPham_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDLoaiSP", sanpham.IDLoaiSP);
cm.Parameters.AddWithValue("@IDDiaDiem", sanpham.IDDiaDiem);
cm.Parameters.AddWithValue("@IDHangSanXuat", sanpham.IDHangSanXuat);
cm.Parameters.AddWithValue("@GiaBan", sanpham.GiaBan);
cm.Parameters.AddWithValue("@GiaTriThuc", sanpham.GiaTriThuc);
cm.Parameters.AddWithValue("@DieuKienSuDung", sanpham.DieuKienSuDung);
cm.Parameters.AddWithValue("@MoTaSP", sanpham.MoTaSP);
cm.Parameters.AddWithValue("@SoLuongSP", sanpham.SoLuongSP);
cm.Parameters.AddWithValue("@SoLuongBan", sanpham.SoLuongBan);
cm.Parameters.AddWithValue("@SoLuongDaBan", sanpham.SoLuongDaBan);
cm.Parameters.AddWithValue("@IDTrangThaiSP", sanpham.IDTrangThaiSP);
cm.Parameters.AddWithValue("@NgayBDBan", sanpham.NgayBDBan);
cm.Parameters.AddWithValue("@NgayKTBan", sanpham.NgayKTBan);
cm.Parameters.AddWithValue("@NgayCapNhat", sanpham.NgayCapNhat);
cm.Parameters.AddWithValue("@IDNhanVien", sanpham.IDNhanVien);
cm.Parameters.AddWithValue("@IDDoanhNghiep", sanpham.IDDoanhNghiep);
cm.Parameters.AddWithValue("@TiLeHoaHong", sanpham.TiLeHoaHong);
cm.ExecuteNonQuery();
}
public void Update(tbSanPham sanpham)
{
SqlCommand cm = new SqlCommand("SanPham_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDLoaiSP", sanpham.IDLoaiSP);
cm.Parameters.AddWithValue("@IDDiaDiem", sanpham.IDDiaDiem);
cm.Parameters.AddWithValue("@IDHangSanXuat", sanpham.IDHangSanXuat);
cm.Parameters.AddWithValue("@GiaBan", sanpham.GiaBan);
cm.Parameters.AddWithValue("@GiaTriThuc", sanpham.GiaTriThuc);
cm.Parameters.AddWithValue("@DieuKienSuDung", sanpham.DieuKienSuDung);
cm.Parameters.AddWithValue("@MoTaSP", sanpham.MoTaSP);
cm.Parameters.AddWithValue("@SoLuongSP", sanpham.SoLuongSP);
cm.Parameters.AddWithValue("@SoLuongBan", sanpham.SoLuongBan);
cm.Parameters.AddWithValue("@SoLuongDaBan", sanpham.SoLuongDaBan);
cm.Parameters.AddWithValue("@IDTrangThaiSP", sanpham.IDTrangThaiSP);
cm.Parameters.AddWithValue("@NgayBDBan", sanpham.NgayBDBan);
cm.Parameters.AddWithValue("@NgayKTBan", sanpham.NgayKTBan);
cm.Parameters.AddWithValue("@NgayCapNhat", sanpham.NgayCapNhat);
cm.Parameters.AddWithValue("@IDNhanVien", sanpham.IDNhanVien);
cm.Parameters.AddWithValue("@IDDoanhNghiep", sanpham.IDDoanhNghiep);
cm.Parameters.AddWithValue("@TiLeHoaHong", sanpham.TiLeHoaHong);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("SanPham_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDSanPham", Id);
cm.ExecuteNonQuery();
}
public Entities.tbSanPham.tbSanPhamCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("SanPham_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbSanPham.tbSanPhamCollection sanphamcollection = new tbSanPham.tbSanPhamCollection();
while (dr.Read())
{
tbSanPham sanpham = new tbSanPham();
sanpham.IDSanPham = int.Parse(dr.GetValue(0).ToString());
sanpham.TenSanPham = dr.GetValue(1).ToString();
sanpham.IDLoaiSP =dr.GetValue(2).ToString();
sanpham.IDDiaDiem = int.Parse(dr.GetValue(3).ToString());
sanpham.IDHangSanXuat = dr.GetValue(4).ToString();
sanpham.GiaBan = int.Parse(dr.GetValue(5).ToString());
sanpham.GiaTriThuc =int.Parse( dr.GetValue(6).ToString());
sanpham.DieuKienSuDung = dr.GetValue(7).ToString();
sanpham.MoTaSP = dr.GetValue(8).ToString();
sanpham.SoLuongSP = int.Parse(dr.GetValue(9).ToString());
sanpham.SoLuongBan = int.Parse(dr.GetValue(10).ToString());
sanpham.SoLuongDaBan = int.Parse(dr.GetValue(11).ToString());
sanpham.IDTrangThaiSP = int.Parse(dr.GetValue(12).ToString());
sanpham.NgayBDBan = DateTime.Parse(dr.GetValue(13).ToString());
sanpham.NgayKTBan = DateTime.Parse(dr.GetValue(14).ToString());
sanpham.NgayCapNhat = DateTime.Parse (dr.GetValue(15).ToString());
sanpham.IDNhanVien = dr.GetValue(16).ToString();
sanpham.IDDoanhNghiep =dr.GetValue(17).ToString();
sanpham.TiLeHoaHong = float.Parse(dr.GetValue(18).ToString());
sanphamcollection.Add(sanpham);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return sanphamcollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbSanPhamDAL.cs
|
C#
|
gpl3
| 6,513
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
public class tbNhanVienDAL
{
private SqlConnection cn = null;
public tbNhanVienDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbNhanVien nv)
{
SqlCommand cm = new SqlCommand("sp_tbNhanVien_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenNV", nv.TenNV);
cm.Parameters.AddWithValue("@DiaChi", nv.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", nv.DienThoai);
cm.Parameters.AddWithValue("@Email", nv.Email);
cm.ExecuteNonQuery();
}
public void Update(tbNhanVien nv)
{
SqlCommand cm = new SqlCommand("NhanVien_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TenNV", nv.TenNV);
cm.Parameters.AddWithValue("@DiaChi", nv.DiaChi);
cm.Parameters.AddWithValue("@DienThoai", nv.DienThoai);
cm.Parameters.AddWithValue("@Email", nv.Email);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("NhanVien_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDNhanVien", Id);
cm.ExecuteNonQuery();
}
public Entities.tbNhanVien.tbNhanVienCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("NhanVien_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbNhanVien.tbNhanVienCollection nvcollection = new tbNhanVien.tbNhanVienCollection();
while (dr.Read())
{
tbNhanVien nv = new tbNhanVien();
nv.IDNhanVien = int.Parse (dr.GetValue(0).ToString());
nv.TenNV = dr.GetValue(1).ToString();
nv.DiaChi = dr.GetValue(2).ToString();
nv.DienThoai = int.Parse(dr.GetValue(3).ToString());
nv.Email = dr.GetValue(4).ToString();
nvcollection.Add(nv);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return nvcollection ;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbNhanVienDAL.cs
|
C#
|
gpl3
| 3,377
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbTTDonHangDAL
{
private SqlConnection cn = null;
public tbTTDonHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbTTDonHang ttdh)
{
SqlCommand cm = new SqlCommand("HTTDonHang_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThaiDH ", ttdh.TrangThaiDH);
cm.ExecuteNonQuery();
}
public void Update(tbTTDonHang ttdh)
{
SqlCommand cm = new SqlCommand("TTDonHang_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@TrangThaiDH ", ttdh.TrangThaiDH);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("TTDonHang_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDTTDonHang ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbTTDonHang.tbTTDonHangCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("TTDonHang_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbTTDonHang.tbTTDonHangCollection ttdhcollection = new tbTTDonHang.tbTTDonHangCollection();
while (dr.Read())
{
tbTTDonHang ttdh = new tbTTDonHang();
ttdh.IDTTDonHang = int.Parse(dr.GetValue(0).ToString());
ttdh.TrangThaiDH = dr.GetValue(1).ToString();
ttdhcollection.Add(ttdh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ttdhcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbTTDonHangDAL.cs
|
C#
|
gpl3
| 2,814
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbHinhAnhDAL
{
private SqlConnection cn = null;
public tbHinhAnhDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbHinhAnh ha)
{
SqlCommand cm = new SqlCommand("HinhAnh_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDSanPham ", ha.IDSanPham);
cm.Parameters.AddWithValue("@TenHinh ", ha.TenHinh);
cm.ExecuteNonQuery();
}
public void Update(tbHinhAnh ha)
{
SqlCommand cm = new SqlCommand("HinhAnh_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDSanPham ", ha.IDSanPham);
cm.Parameters.AddWithValue("@TenHinh ", ha.TenHinh);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("HinhAnh_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDHinhAnh ", Id);
cm.ExecuteNonQuery();
}
public Entities.tbHinhAnh.tbHinhAnhCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("HinhAnh_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbHinhAnh.tbHinhAnhCollection hacollection = new tbHinhAnh.tbHinhAnhCollection();
while (dr.Read())
{
tbHinhAnh ha = new tbHinhAnh();
ha.IDHinhAnh = int.Parse(dr.GetValue(0).ToString());
ha.IDSanPham = int.Parse(dr.GetValue(1).ToString());
ha.TenHinh = dr.GetValue(2).ToString();
hacollection.Add(ha);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return hacollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbHinhAnhDAL.cs
|
C#
|
gpl3
| 2,944
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using Entities;
namespace DAL
{
public class tbCTDonHangDAL
{
private SqlConnection cn = null;
public tbCTDonHangDAL()
{
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
cn.Open();
}
public void Insert(tbChiTietDH ctdh)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Insert", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDCTDH ", ctdh.IDCTDH);
cm.Parameters.AddWithValue("@IDSanPham ", ctdh.IDSanPham);
cm.Parameters.AddWithValue("@IDDonHang ", ctdh.IDDonHang);
cm.Parameters.AddWithValue("@SoLuong ", ctdh.SoLuong);
cm.Parameters.AddWithValue("@ThanhTien ", ctdh.ThanhTien);
cm.ExecuteNonQuery();
}
public void Update(tbChiTietDH ctdh)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Update", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@IDCTDH ", ctdh.IDCTDH);
cm.Parameters.AddWithValue("@IDSanPham ", ctdh.IDSanPham);
cm.Parameters.AddWithValue("@IDDonHang ", ctdh.IDDonHang);
cm.Parameters.AddWithValue("@SoLuong ", ctdh.SoLuong);
cm.Parameters.AddWithValue("@ThanhTien ", ctdh.ThanhTien);
cm.ExecuteNonQuery();
}
public void Delete(int Id)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Delete", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@MaCTDonHang", Id);
cm.ExecuteNonQuery();
}
public Entities.tbChiTietDH.tbChiTietDHCollection Get(string Where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int totalRecords)
{
SqlCommand cm = new SqlCommand("ChiTietDH_Get", cn);
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@Where", Where);
cm.Parameters.AddWithValue("@PageIndex", pageIndex);
cm.Parameters.AddWithValue("@PageSize", pageSize);
cm.Parameters.AddWithValue("@OrderBy", orderBy);
cm.Parameters.AddWithValue("@OrderDirection", orderDirection);
cm.Parameters.Add(new SqlParameter("@TotalRecords", System.Data.DbType.Int32)).Direction = System.Data.ParameterDirection.Output;
SqlDataReader dr = cm.ExecuteReader();
tbChiTietDH.tbChiTietDHCollection ctdhcollection = new tbChiTietDH.tbChiTietDHCollection();
while (dr.Read())
{
tbChiTietDH ctdh = new tbChiTietDH();
ctdh.IDCTDH = int.Parse(dr.GetValue(0).ToString());
ctdh.IDSanPham = int.Parse(dr.GetValue(1).ToString());
ctdh.IDDonHang = int.Parse(dr.GetValue(2).ToString());
ctdh.SoLuong = int.Parse(dr.GetValue(3).ToString());
ctdh.ThanhTien = int.Parse(dr.GetValue(4).ToString());
ctdhcollection.Add(ctdh);
}
dr.Close();
totalRecords = int.Parse(cm.Parameters["@TotalRecords"].Value.ToString());
return ctdhcollection;
}
}
}
|
02cdnth2-nhom1
|
trunk/source/02cdnth2_nhom1_vantuan/Website/DAL/tbCTDonHangDAL.cs
|
C#
|
gpl3
| 3,557
|
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
</body>
</html>
|
10guanxin
|
trunk/srtp-guanxin/WebRoot/index.jsp
|
Java Server Pages
|
asf20
| 831
|
#include <pspsdk.h>
#include "led.h"
/*
* Imports from library: sceSysEventForKernel
*/
extern void sceKernelRegisterSysEventHandler (int arg1);
extern void sceKernelUnregisterSysEventHandler (int arg1);
/*
* Imports from library: InterruptManagerForKernel
*/
extern void InterruptManagerForKernel_668A0FF9 (int arg1, int arg2);
extern void InterruptManagerForKernel_CFFA1857 (int arg1, int arg2, int arg3, int arg4);
extern void sceKernelReleaseSubIntrHandler (int arg1, int arg2);
extern void sceKernelEnableSubIntr (int arg1, int arg2);
/*
* Imports from library: SysclibForKernel
*/
extern void memset (int arg1, int arg2, int arg3);
/*
* Imports from library: sceSyscon_driver
*/
extern void sceSysconCtrlLED (int arg1, int arg2);
extern int sceSyscon_driver_42E443D6 ();
extern int sceSyscon_driver_4B8F3502 ();
extern int sceSyscon_driver_8A65C819 ();
/*
* Imports from library: sceGpio_driver
*/
extern void sceGpioPortClear (int arg1);
extern void sceGpioPortSet (int arg1);
extern void sceGpioSetPortMode (int arg1, int arg2);
/**
* Subroutine at address 0x00000000
*/
void sceLedInit ()
{
sp = sp + 0xFFFFFFE0;
((int *) sp)[0] = s0;
((int *) sp)[1] = s1;
((int *) sp)[4] = ra;
((int *) sp)[3] = s3;
((int *) sp)[2] = s2;
memset (0x00000C10, 0x00000000, 0x000000F0);
*((int *) 0x00000D00) = 0x00000002;
*((char *) 0x00000C10) = 0x00000006;
*((char *) 0x00000C12) = 0x00000000;
*((char *) 0x00000C60) = 0x00000007;
*((char *) 0x00000C62) = 0x00000001;
var5 = sceSyscon_driver_8A65C819 ();
var6 = var5 >> 0x00000010;
var7 = var6 & 0x000000F0;
if ((((0x00000000 < var7)) & ((0x00000000 < (var7 ^ 0x00000010)))) != 0x00000000)
{
*((char *) 0x00000C61) = 0x00000001;
}
if (var7 == 0x00000020)
{
var8 = *((int *) 0x00000D00);
if (!((((var6 & 0x000000FF) < 0x0000002A)) != 0x00000000))
{
*((char *) 0x00000CB1) = 0x00000001;
*((char *) 0x00000CB0) = 0x00000018;
*((char *) 0x00000CB2) = 0x00000003;
*((int *) 0x00000D00) = 0x00000003;
label11:
var8 = *((int *) 0x00000D00);
}
}
else
goto label11;
var9 = 0x00000000;
if (!(var8 <= 0))
{
var10 = 0x00000C10;
while (1) {
var11 = ((unsigned char *) var10)[0];
var9 = var9 + 0x00000001;
sceGpioSetPortMode (var11, 0x00000000);
var14 = *((int *) 0x00000D00);
var10 = var10 + 0x00000050;
if (((var9 < var14)) != 0x00000000)
continue;
break;
}
}
var15 = *((int *) 0x00000D00);
var16 = 0x00000000;
if (!(var15 <= 0))
{
var17 = 0x00000C10;
while (1) {
var18 = ((unsigned char *) var17)[1];
if (var18 == 0x00000000)
{
var36 = ((unsigned char *) var17)[0];
sceGpioPortClear ((0x00000001 << var36));
var39 = ((unsigned char *) var17)[2];
}
else
{
var19 = ((unsigned char *) var17)[0];
sceGpioPortSet ((0x00000001 << var19));
var22 = ((unsigned char *) var17)[2];
}
var16 = var16 + 0x00000001;
sceSysconCtrlLED (var22, 0x00000001);
var25 = *((int *) 0x00000D00);
var17 = var17 + 0x00000050;
if (((var16 < var25)) != 0x00000000)
continue;
break;
}
}
InterruptManagerForKernel_CFFA1857 (0x0000001E, 0x00000019, InterruptHandler, 0x00000000);
sceKernelEnableSubIntr (0x0000001E, 0x00000019);
sceKernelRegisterSysEventHandler (0x00000BD0);
ra = ((int *) sp)[4];
var32 = ((int *) sp)[3];
var33 = ((int *) sp)[2];
var34 = ((int *) sp)[1];
var35 = ((int *) sp)[0];
sp = sp + 0x00000020;
return;
}
/**
* Subroutine at address 0x00000198
*/
void sceLedSuspend ()
{
sp = sp + 0xFFFFFFF0;
((int *) sp)[1] = ra;
((int *) sp)[0] = s0;
InterruptManagerForKernel_668A0FF9 (0x0000001E, 0x00000019);
sceGpioPortClear (0x00000040);
sceGpioSetPortMode (0x00000006, 0x00000002);
sceSysconCtrlLED (0x00000001, 0x00000000);
var11 = sceSyscon_driver_42E443D6 ();
if (var11 == 0x00000000)
{
sceGpioPortClear (0x00000080);
sceGpioSetPortMode (0x00000006, 0x00000002);
label24:
}
else
{
var12 = *((unsigned char *) 0x00000C61);
if ((var12 ^ 0x00000001) == 0x00000000)
{
var34 = *((unsigned char *) 0x00000C60);
sceGpioPortClear ((0x00000001 << var34));
}
else
{
var13 = *((unsigned char *) 0x00000C60);
sceGpioPortSet ((0x00000001 << var13));
goto label24;
}
}
var16 = *((unsigned char *) 0x00000CB2);
ra = ((int *) sp)[1];
if (var16 != 0x00000000)
{
sceSysconCtrlLED (0x00000003, 0x00000000);
var22 = sceSyscon_driver_4B8F3502 ();
if (var22 == 0x00000000)
{
sceGpioPortClear (0x01000000);
sceGpioSetPortMode (0x00000018, 0x00000002);
ra = ((int *) sp)[1];
}
else
{
var23 = *((unsigned char *) 0x00000CB1);
if ((var23 ^ 0x00000001) == 0x00000000)
{
var27 = *((unsigned char *) 0x00000CB0);
sceGpioPortClear ((0x00000001 << var27));
ra = ((int *) sp)[1];
}
else
{
var24 = *((unsigned char *) 0x00000CB0);
sceGpioPortSet ((0x00000001 << var24));
ra = ((int *) sp)[1];
}
}
}
var17 = ((int *) sp)[0];
sp = sp + 0x00000010;
return;
}
void InterruptHandler ()
{
var1 = *((int *) 0x00000D00);
var2 = 0x00000000;
if (!(var1 <= 0)){
var3 = 0x00000C10;
var4 = *((int *) 0x00000C14);
while (1) {
var2 = var2 + 0x00000001;
var3 = var3 + 0x00000050;
if (var4 == 0x00000003)
{
sub_0040C (var3);
var5 = *((int *) 0x00000D00);
}
else
{
var5 = *((int *) 0x00000D00);
}
if (!(((var2 < var5)) != 0x00000000))
break;
var4 = ((int *) var3)[1];
continue;
}
}
var6 = *((int *) 0x00000D00);
var7 = 0x00000000;
if (!(var6 <= 0))
{
var8 = 0x00000C10;
while (1) {
var9 = ((int *) var8)[5];
if (var9 <= 0)
{
if (var9 != 0x00000000)
{
var10 = ((int *) var8)[2];
}
else
{
var27 = ((int *) var8)[6];
((int *) var8)[2] = 0x00000000;
((int *) var8)[3] = 0x00000000;
((int *) var8)[4] = 0x00000000;
if (var27 != 0x00000000)
{
((int *) var8)[3] = 0x00000001;
}
else
{
((int *) var8)[4] = 0x00000001;
}
label20:
var10 = ((int *) var8)[2];
}
}
else
{
((int *) var8)[5] = (var9 + 0xFFFFFFFF);
goto label20;
}
var11 = ((int *) var8)[3];
var12 = ((int *) var8)[4];
var13 = var10 + 0x00000001;
((int *) var8)[2] = var13;
if (!(((var13 < (var11 + var12))) != 0x00000000))
{
((int *) var8)[2] = 0x00000000;
}
var14 = ((int *) var8)[2];
var15 = ((unsigned char *) var8)[1];
if (((var14 < var11)) == var15)
{
var24 = ((unsigned char *) var8)[0];
sceGpioPortClear ((0x00000001 << var24));
var19 = *((int *) 0x00000D00);
}
else
{
var16 = ((unsigned char *) var8)[0];
sceGpioPortSet ((0x00000001 << var16));
var19 = *((int *) 0x00000D00);
}
var7 = var7 + 0x00000001;
var8 = var8 + 0x00000050;
if (((var7 < var19)) != 0x00000000)
continue;
break;
}
}
ra = ((int *) sp)[4];
var20 = ((int *) sp)[3];
var21 = ((int *) sp)[2];
var22 = ((int *) sp)[1];
var23 = ((int *) sp)[0];
sp = sp + 0x00000020;
return;
}
/**
* Subroutine at address 0x0000040C
*/
void sub_0040C (int arg1)
{
var1 = ((int *) arg1)[8];
var2 = arg1;
if (var1 <= 0)
{
label4:
var4 = ((int *) var2)[9];
if (var4 == 0x00000000)
{
((int *) var2)[9] = var4;
}
else
{
var5 = ((unsigned char *) var4)[0];
while (1) {
var4 = var4 + 0x00000001;
if (((char) var5) < 0)
{
((int *) var2)[8] = (var5 & 0x0000007F);
}
else
{
if (((var5 < 0x00000014)) == 0x00000000)
{
var4 = 0x00000000;
label32:
if (!(var4 != 0x00000000))
break;
var5 = ((unsigned char *) var4)[0];
continue;
}
else
{
var6 = ((int *) ((var5 << 0x00000002) + 0x00000B74))[0];
switch () {
case 0:
var4 = 0x00000000;
goto label35;
case 1:
((int *) var2)[10] = var4;
goto label32;
case 2:
var4 = ((int *) var2)[10];
goto label32;
case 3:
var7 = ((int *) var2)[11];
if (((var7 < 0x00000004)) == 0x00000000)
{
var4 = 0x00000000;
}
else
{
var8 = ((unsigned char *) var4)[0];
((int *) ((var7 << 0x00000003) + var2))[13] = var8;
var4 = var4 + 0x00000001;
var9 = ((int *) var2)[11];
((int *) ((var9 << 0x00000003) + var2))[12] = var4;
((int *) var2)[11] = (var9 + 0x00000001);
goto label32;
}
case 4:
var10 = ((int *) var2)[11];
if (var10 <= 0)
{
var4 = 0x00000000;
}
else
{
var11 = (var10 << 0x00000003) + var2;
var12 = ((int *) var11)[11];
((int *) var11)[11] = (var12 + 0xFFFFFFFF);
var13 = ((int *) var2)[11];
var14 = (var13 << 0x00000003) + var2;
var15 = ((int *) var14)[11];
if (var15 <= 0)
{
((int *) var2)[11] = (var13 + 0xFFFFFFFF);
}
else
{
var4 = ((int *) var14)[12];
}
goto label32;
}
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
var4 = 0x00000000;
goto label32;
case 16:
((int *) var2)[3] = 0x00000001;
((int *) var2)[7] = 0x00000001;
label20:
((int *) var2)[4] = 0x00000000;
goto label32;
case 17:
((int *) var2)[4] = 0x00000001;
((int *) var2)[7] = 0x00000000;
label18:
((int *) var2)[3] = 0x00000000;
goto label32;
case 18:
var16 = ((int *) var2)[7];
if (var16 == 0x00000001)
{
((int *) var2)[3] = 0x00000001;
((int *) var2)[7] = 0x00000000;
goto label20;
}
else
{
((int *) var2)[4] = 0x00000001;
((int *) var2)[7] = 0x00000001;
goto label18;
}
goto label32;
case 19:
((int *) var2)[7] = 0x00000002;
var17 = var4 + 0x00000001;
var18 = ((unsigned char *) var4)[0];
var4 = var17 + 0x00000001;
((int *) var2)[3] = var18;
var19 = ((unsigned char *) var17)[0];
((int *) var2)[4] = var19;
goto label32;
}
}
}
}
label35:
((int *) var2)[9] = var4;
}
}
else
{
var3 = var1 + 0xFFFFFFFF;
((int *) arg1)[8] = var3;
if (var3 <= 0)
goto label4;
}
return;
}
/**
* Subroutine at address 0x000005A0
*/
void sceLedSetMode (int arg1, int arg2, int arg3)
{
if (arg1 < 0)
{
label23:
var2 = 0x80000102;
}
else
{
var1 = *((int *) 0x00000D00);
if (((arg1 < var1)) != 0x00000000)
{
var2 = 0x80000107;
if (!(((arg2 < 0x00000004)) == 0x00000000))
{
var3 = (((arg1 << 0x00000002) + arg1) << 0x00000004) + 0x00000C10;
((int *) var3)[5] = 0xFFFFFFFF;
((int *) var3)[9] = 0x00000000;
var4 = ((int *) var3)[1];
((int *) var3)[1] = arg2;
if (arg2 == 0x00000001)
{
((int *) var3)[3] = arg2;
((int *) var3)[4] = 0x00000000;
((int *) var3)[2] = 0x00000000;
label21:
var2 = 0x00000000;
}
else
{
if (((arg2 < 0x00000002)) != 0x00000000)
{
if (arg2 != 0x00000000)
{
var2 = 0x00000000;
}
else
{
((int *) var3)[4] = 0x00000001;
((int *) var3)[2] = 0x00000000;
((int *) var3)[3] = 0x00000000;
goto label21;
}
}
else
{
if (arg2 == 0x00000002)
{
if (var4 != arg2)
{
((int *) var3)[2] = 0x00000000;
}
var5 = ((int *) arg3)[1];
((int *) var3)[3] = var5;
var6 = ((int *) arg3)[2];
((int *) var3)[4] = var6;
var7 = ((int *) arg3)[3];
((int *) var3)[5] = var7;
var8 = ((int *) arg3)[4];
((int *) var3)[6] = var8;
}
else
{
if (arg2 == 0x00000003)
{
if (var4 != arg2)
{
((int *) var3)[7] = var4;
}
((int *) var3)[8] = 0x00000001;
((int *) var3)[9] = arg3;
((int *) var3)[11] = 0x00000000;
((int *) var3)[2] = 0x00000000;
((int *) var3)[10] = 0x00000000;
}
}
goto label21;
}
}
}
}
else
{
goto label23;
}
}
return;
}
void module_start (){
sceLedInit ();
}
void module_reboot_before (){
var1 = 0x00000000;
sceKernelUnregisterSysEventHandler (0x00000BD0);
sceKernelReleaseSubIntrHandler (0x0000001E, 0x00000019);
var7 = 0x00000C10;
while (var1 < *((int *) 0x00000D00)) {
if (((unsigned char *) var7)[1]){
sceGpioPortSet ((0x00000001 << var9 = ((unsigned char *) var7)[0]));
}else{
sceGpioPortClear ((0x00000001 << ((unsigned char *) var7)[0]));
}
var1++;
var7+=0x50;
}
}
/**
* Subroutine at address 0x0000076C
*/
void sceLedEnd ()
{
sp = sp + 0xFFFFFFE0;
((int *) sp)[4] = ra;
((int *) sp)[3] = s3;
((int *) sp)[1] = s1;
var1 = 0x00000000;
((int *) sp)[2] = s2;
((int *) sp)[0] = s0;
sceKernelUnregisterSysEventHandler (0x00000BD0);
sceKernelReleaseSubIntrHandler (0x0000001E, 0x00000019);
var6 = *((int *) 0x00000D00);
if (!(var6 <= 0))
{
var7 = 0x00000C10;
while (1) {
var8 = ((unsigned char *) var7)[1];
if (var8 == 0x00000000)
{
var17 = ((unsigned char *) var7)[0];
sceGpioPortClear ((0x00000001 << var17));
var12 = *((int *) 0x00000D00);
}
else
{
var9 = ((unsigned char *) var7)[0];
sceGpioPortSet ((0x00000001 << var9));
var12 = *((int *) 0x00000D00);
}
var1 = var1 + 0x00000001;
var7 = var7 + 0x00000050;
if (((var1 < var12)) != 0x00000000)
continue;
break;
}
}
ra = ((int *) sp)[4];
var13 = ((int *) sp)[3];
var14 = ((int *) sp)[2];
var15 = ((int *) sp)[1];
var16 = ((int *) sp)[0];
sp = sp + 0x00000020;
return;
}
/**
* Subroutine at address 0x00000814
*/
void sceLedResume ()
{
sp = sp + 0xFFFFFFE0;
((int *) sp)[3] = s3;
var1 = *((int *) 0x00000D00);
((int *) sp)[1] = s1;
var2 = 0x00000000;
((int *) sp)[4] = ra;
((int *) sp)[2] = s2;
((int *) sp)[0] = s0;
if (!(var1 <= 0))
{
var3 = 0x00000C10;
var4 = *((unsigned char *) 0x00000C11);
while (1) {
if (var4 == 0x00000000)
{
var21 = ((unsigned char *) var3)[0];
sceGpioPortClear ((0x00000001 << var21));
var24 = ((unsigned char *) var3)[0];
}
else
{
var5 = ((unsigned char *) var3)[0];
sceGpioPortSet ((0x00000001 << var5));
var8 = ((unsigned char *) var3)[0];
}
var2 = var2 + 0x00000001;
sceGpioSetPortMode (var8, 0x00000000);
var11 = ((unsigned char *) var3)[2];
var3 = var3 + 0x00000050;
sceSysconCtrlLED (var11, 0x00000001);
var14 = *((int *) 0x00000D00);
if (!(((var2 < var14)) != 0x00000000))
break;
var4 = ((unsigned char *) var3)[1];
continue;
}
}
sceKernelEnableSubIntr (0x0000001E, 0x00000019);
ra = ((int *) sp)[4];
var17 = ((int *) sp)[3];
var18 = ((int *) sp)[2];
var19 = ((int *) sp)[1];
var20 = ((int *) sp)[0];
sp = sp + 0x00000020;
return;
}
/**
* Subroutine at address 0x000008CC
*/
void sub_008CC (int arg1)
{
sp = sp + 0xFFFFFFF0;
((int *) sp)[0] = ra;
if (arg1 == 0x0000400A)
{
sceLedSuspend ();
ra = ((int *) sp)[0];
}
else
{
if (arg1 == 0x00100000)
{
sceLedResume ();
ra = ((int *) sp)[0];
}
else
{
ra = ((int *) sp)[0];
}
}
sp = sp + 0x00000010;
return;
}
|
0xb15c077e
|
trunk/RE/PSP/led.c
|
C
|
mit
| 18,116
|
#ifndef __EXCEPTIONMAN_H
#define __EXCEPTIONMAN_H
/*
* Exports from library: syslib
*/
void module_bootstart (void);
/*
* Exports from library: ExceptionManagerForKernel
*/
void sceKernelRegisterNmiHandler (void);
void ExceptionManagerForKernel_60DFC510 (void);
void ExceptionManagerForKernel_792C424C (void);
void ExceptionManagerForKernel_A966D178 (void);
void sceKernelReleaseNmiHandler (void);
void ExceptionManagerForKernel_CF57A486 (void);
void ExceptionManagerForKernel_D74DECBB (void);
void ExceptionManagerForKernel_E1F6B00B (void);
void ExceptionManagerForKernel_F937D843 (void);
#endif /* __EXCEPTIONMAN_H */
|
0xb15c077e
|
trunk/RE/PSP/exceptionman.h
|
C
|
mit
| 649
|