基本信息
源码名称:KTV系统源码
源码大小:1.30M
文件格式:.rar
开发语言:C#
更新时间:2017-11-17
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 3 元×
微信扫码支付:3 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
OleDbDataReader dr = tbAuMenthod.AuthFind(strgetId);
dr.Read();
if (dr.HasRows)
{
txtauthorId.Text = dr[0].ToString();
txtauthorName.Text=dr[1].ToString();
cmbauthorSex.Text=dr[2].ToString();
daAuthorbirthday.Value=Convert.ToDateTime(dr[3].ToString());
comboBox2.Text=dr[4].ToString();
cmbauthorcompany.Text=dr[5].ToString();
txtauthorRecma.Text=dr[6].ToString();
txtauthorzjm.Text=dr[7].ToString();
}
dr.Close();
}
private void bntSure_Click(object sender, EventArgs e)
{
if (txtauthorName.Text == "")
{
MessageBox.Show("姓名不能为空");
return;
}
tbAu.intauthorId = txtauthorId.Text;
tbAu.strauthorName = txtauthorName.Text;
tbAu.strauthorSex = cmbauthorSex.Text;
tbAu.daauthorbirthday = daAuthorbirthday.Value;
tbAu.strauthorGenre = comboBox2.Text;
tbAu.strauthorcompany = cmbauthorcompany.Text;
tbAu.strauthorRecma = txtauthorRecma.Text;
tbAu.strauthorzjm = txtauthorzjm.Text;
tbAu.daRdateTime = DateTime.Now;
if (intFalg == 1)
{
if (tbAuMenthod.AuthAdd(tbAu) == 1)
{
MessageBox.Show("添加成功!");
frmMain frm = (frmMain)this.Owner;
tbAuMenthod.tb_authorinfoFill("2",frm.lvAuton);
intFalg = 0;
this.Close();
}
else
{
MessageBox.Show("添加失败");
intFalg = 0;
this.Close();
}
}
if (intFalg == 2)
{
if (tbAuMenthod.AuthUpdate(tbAu) == 1)
{
MessageBox.Show("修改成功");
frmMain frm = (frmMain)this.Owner;
tbAuMenthod.tb_authorinfoFill("2", frm.lvAuton);
intFalg = 0;
this.Close();
}
else
{
MessageBox.Show("修改失败");
intFalg = 0;
this.Close();
}
}
}
public static string GetCodstring(string UnName)
{
int i = 0;
ushort key = 0;
string strResult = string.Empty;
//创建两个不同的encoding对象
Encoding unicode = Encoding.Unicode;
//创建GBK码对象
Encoding gbk = Encoding.GetEncoding(936);
//将unicode字符串转换为字节
byte[] unicodeBytes = unicode.GetBytes(UnName);
//再转化为GBK码
byte[] gbkBytes = Encoding.Convert(unicode, gbk, unicodeBytes);
while (i < gbkBytes.Length)
{
//如果为数字\字母\其他ASCII符号
if (gbkBytes[i] <= 127)
{
strResult = strResult (char)gbkBytes[i];
i ;
}
#region 否则生成汉字拼音简码,取拼音首字母
else
{
key = (ushort)(gbkBytes[i] * 256 gbkBytes[i 1]);
if (key >= '\uB0A1' && key <= '\uB0C4')
{
strResult = strResult "A";
}
else if (key >= '\uB0C5' && key <= '\uB2C0')
{
strResult = strResult "B";
}
else if (key >= '\uB2C1' && key <= '\uB4ED')
{
strResult = strResult "C";
}
else if (key >= '\uB4EE' && key <= '\uB6E9')
{
strResult = strResult "D";
}
else if (key >= '\uB6EA' && key <= '\uB7A1')
{
strResult = strResult "E";
}
else if (key >= '\uB7A2' && key <= '\uB8C0')
{
strResult = strResult "F";
}
else if (key >= '\uB8C1' && key <= '\uB9FD')
{
strResult = strResult "G";
}
else if (key >= '\uB9FE' && key <= '\uBBF6')
{
strResult = strResult "H";
}
else if (key >= '\uBBF7' && key <= '\uBFA5')
{
strResult = strResult "J";
}
else if (key >= '\uBFA6' && key <= '\uC0AB')
{
strResult = strResult "K";
}
else if (key >= '\uC0AC' && key <= '\uC2E7')
{
strResult = strResult "L";
}
else if (key >= '\uC2E8' && key <= '\uC4C2')
{
strResult = strResult "M";
}
else if (key >= '\uC4C3' && key <= '\uC5B5')
{
strResult = strResult "N";
}
else if (key >= '\uC5B6' && key <= '\uC5BD')
{
strResult = strResult "O";
}
else if (key >= '\uC5BE' && key <= '\uC6D9')
{
strResult = strResult "P";
}
else if (key >= '\uC6DA' && key <= '\uC8BA')
{
strResult = strResult "Q";
}
else if (key >= '\uC8BB' && key <= '\uC8F5')
{
strResult = strResult "R";
}
else if (key >= '\uC8F6' && key <= '\uCBF9')
{
strResult = strResult "S";
}
else if (key >= '\uCBFA' && key <= '\uCDD9')
{
strResult = strResult "T";
}
else if (key >= '\uCDDA' && key <= '\uCEF3')
{
strResult = strResult "W";
}
else if (key >= '\uCEF4' && key <= '\uD188')
{
strResult = strResult "X";
}
else if (key >= '\uD1B9' && key <= '\uD4D0')
{
strResult = strResult "Y";
}
else if (key >= '\uD4D1' && key <= '\uD7F9')
{
strResult = strResult "Z";
}
else
{
strResult = strResult "?";
}
i = i 2;
}
#endregion
}//end while
return strResult;
}
登陆界面
首页
部分代码::
public void getFill()
{OleDbDataReader dr = tbAuMenthod.AuthFind(strgetId);
dr.Read();
if (dr.HasRows)
{
txtauthorId.Text = dr[0].ToString();
txtauthorName.Text=dr[1].ToString();
cmbauthorSex.Text=dr[2].ToString();
daAuthorbirthday.Value=Convert.ToDateTime(dr[3].ToString());
comboBox2.Text=dr[4].ToString();
cmbauthorcompany.Text=dr[5].ToString();
txtauthorRecma.Text=dr[6].ToString();
txtauthorzjm.Text=dr[7].ToString();
}
dr.Close();
}
private void bntSure_Click(object sender, EventArgs e)
{
if (txtauthorName.Text == "")
{
MessageBox.Show("姓名不能为空");
return;
}
tbAu.intauthorId = txtauthorId.Text;
tbAu.strauthorName = txtauthorName.Text;
tbAu.strauthorSex = cmbauthorSex.Text;
tbAu.daauthorbirthday = daAuthorbirthday.Value;
tbAu.strauthorGenre = comboBox2.Text;
tbAu.strauthorcompany = cmbauthorcompany.Text;
tbAu.strauthorRecma = txtauthorRecma.Text;
tbAu.strauthorzjm = txtauthorzjm.Text;
tbAu.daRdateTime = DateTime.Now;
if (intFalg == 1)
{
if (tbAuMenthod.AuthAdd(tbAu) == 1)
{
MessageBox.Show("添加成功!");
frmMain frm = (frmMain)this.Owner;
tbAuMenthod.tb_authorinfoFill("2",frm.lvAuton);
intFalg = 0;
this.Close();
}
else
{
MessageBox.Show("添加失败");
intFalg = 0;
this.Close();
}
}
if (intFalg == 2)
{
if (tbAuMenthod.AuthUpdate(tbAu) == 1)
{
MessageBox.Show("修改成功");
frmMain frm = (frmMain)this.Owner;
tbAuMenthod.tb_authorinfoFill("2", frm.lvAuton);
intFalg = 0;
this.Close();
}
else
{
MessageBox.Show("修改失败");
intFalg = 0;
this.Close();
}
}
}
public static string GetCodstring(string UnName)
{
int i = 0;
ushort key = 0;
string strResult = string.Empty;
//创建两个不同的encoding对象
Encoding unicode = Encoding.Unicode;
//创建GBK码对象
Encoding gbk = Encoding.GetEncoding(936);
//将unicode字符串转换为字节
byte[] unicodeBytes = unicode.GetBytes(UnName);
//再转化为GBK码
byte[] gbkBytes = Encoding.Convert(unicode, gbk, unicodeBytes);
while (i < gbkBytes.Length)
{
//如果为数字\字母\其他ASCII符号
if (gbkBytes[i] <= 127)
{
strResult = strResult (char)gbkBytes[i];
i ;
}
#region 否则生成汉字拼音简码,取拼音首字母
else
{
key = (ushort)(gbkBytes[i] * 256 gbkBytes[i 1]);
if (key >= '\uB0A1' && key <= '\uB0C4')
{
strResult = strResult "A";
}
else if (key >= '\uB0C5' && key <= '\uB2C0')
{
strResult = strResult "B";
}
else if (key >= '\uB2C1' && key <= '\uB4ED')
{
strResult = strResult "C";
}
else if (key >= '\uB4EE' && key <= '\uB6E9')
{
strResult = strResult "D";
}
else if (key >= '\uB6EA' && key <= '\uB7A1')
{
strResult = strResult "E";
}
else if (key >= '\uB7A2' && key <= '\uB8C0')
{
strResult = strResult "F";
}
else if (key >= '\uB8C1' && key <= '\uB9FD')
{
strResult = strResult "G";
}
else if (key >= '\uB9FE' && key <= '\uBBF6')
{
strResult = strResult "H";
}
else if (key >= '\uBBF7' && key <= '\uBFA5')
{
strResult = strResult "J";
}
else if (key >= '\uBFA6' && key <= '\uC0AB')
{
strResult = strResult "K";
}
else if (key >= '\uC0AC' && key <= '\uC2E7')
{
strResult = strResult "L";
}
else if (key >= '\uC2E8' && key <= '\uC4C2')
{
strResult = strResult "M";
}
else if (key >= '\uC4C3' && key <= '\uC5B5')
{
strResult = strResult "N";
}
else if (key >= '\uC5B6' && key <= '\uC5BD')
{
strResult = strResult "O";
}
else if (key >= '\uC5BE' && key <= '\uC6D9')
{
strResult = strResult "P";
}
else if (key >= '\uC6DA' && key <= '\uC8BA')
{
strResult = strResult "Q";
}
else if (key >= '\uC8BB' && key <= '\uC8F5')
{
strResult = strResult "R";
}
else if (key >= '\uC8F6' && key <= '\uCBF9')
{
strResult = strResult "S";
}
else if (key >= '\uCBFA' && key <= '\uCDD9')
{
strResult = strResult "T";
}
else if (key >= '\uCDDA' && key <= '\uCEF3')
{
strResult = strResult "W";
}
else if (key >= '\uCEF4' && key <= '\uD188')
{
strResult = strResult "X";
}
else if (key >= '\uD1B9' && key <= '\uD4D0')
{
strResult = strResult "Y";
}
else if (key >= '\uD4D1' && key <= '\uD7F9')
{
strResult = strResult "Z";
}
else
{
strResult = strResult "?";
}
i = i 2;
}
#endregion
}//end while
return strResult;
}