freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

羽毛球會員管理系統(tǒng)(編輯修改稿)

2025-01-20 06:45 本頁面
 

【文章內(nèi)容簡介】 高級權限 = false。 } else if(identity==會員 ) { 添加帳號 = false。 查看帳號 = false。 刪除帳號 = false。 充值 = false。 高級權限 = false。 租借管理 = false。 查看 = false。 編輯通知 = false。 } } 進入系統(tǒng)后,所有球場和球拍的狀態(tài)都初始化為“空閑”,由 RentLoad()方法實現(xiàn),主要代碼如下。 private void RentLoad() { SqlConnection conn = new SqlConnection(Data Source=.\\SQLEXPRESS。AttachDbFilename=|DataDirectory|\\。Integrated Security=True。User Instance=True)。 string query1 = update 球拍表 set 狀態(tài) =39??臻e 39。 string query2 = update 場地表 set 狀態(tài) =39??臻e 39。 try { ()。 SqlCommand cmd1 = new SqlCommand(query1, conn)。 SqlCommand cmd2 = new SqlCommand(query2, conn)。 ()。 ()。 ()。 } catch (Exception ex) { ()。 } finally { ()。 } } 定義一個 Rent 類來臨時存儲租借信息, 包括租借類型、租借的編號、租借的起止時間、花費、租借人等信息。 Rents 序列存儲所有正在租借中的信息。 當已有會員租借物品時,系統(tǒng)需要從當前時間開始計時,達到租借時間時彈出提示消息。 Rent 類的定義如下。 public class Rent { private string type。//租借類型 private int num。//編號 private DateTime dtime。 private string state。//租借狀態(tài) private decimal cost。 public string person。 public string begin。//起始時間 public string end。//截止時間 public string Type { get { return type。 } set { if(value==球場 ||value ==球拍 ) { type=value。 } } } public int Num { get { return num。 } set { if(value0) { num=value。 } } } public DateTime DT { get { return dtime。 } set { dtime=value。 } } public string State { get { return state。 } set { if (value == 使用中 || value == 空閑 ) { state = value。 } } } public decimal Cost { get { return cost。 } set { if (value 0) { cost = value。 } } } public Rent(string type, int num, DateTime dtime, string state,string ps,string be,string en,decimal c) { Type = type。 Num = num。 DT = dtime。 State = state。 person = ps。 begin = be。 end = en。 Cost = c。 } } 定義一個 RentQCorQP()方法 獲取租借信息。 public void RentQCorQP(string type, int num, DateTime dt, string state, string ps, string be, string en, decimal c) { RENT = new Rent(type, num, dt, state, ps, be, en, c)。 (RENT)。 } 為了確保物資到期返還,新增一個 timer 計時控件,不斷遍歷 Rents 序列,當有到期 的租借時,彈出消息框, 將租借狀態(tài)修改為“空閑”, 并將該租借從 Rents序列中移除。 主要代碼如下。 private void timer2_Tick(object sender, EventArgs e) { try { for (int i = 1。 i = 0。 i) { Rent r = (Rent)Rents[i]。 DateTime dt = 。 if ( = dt amp。amp。 == 使用中 ) { = 空閑 。 ( + + + 租借已到時間! \n\n 詳細信息 \n 帳號: + + \n 租借時間: + + \n 返還時間: + + \n 租金: ++元 , 租借管理 )。 string query = 。 switch () { case 球場 : query = update 場地表 set 狀態(tài) =39??臻e 39。 where 場地號 = + ()。 break。 case 球拍 : query = update 球拍表 set 狀態(tài) =39??臻e 39。 where 球拍號 = + ()。 break。 } SqlConnection conn = new SqlConnection(Data Source=.\\SQLEXPRESS。AttachDbFilename=|DataDirectory|\\。Integrated Security=True。User Instance=True)。 try { ()。 SqlCommand cmd = new SqlCommand(query, conn)。 int count = ()。 if (count != 1) { ( + () + 狀態(tài)出錯!, 提示 )。 } ()。 } catch (Exception ex) { ()。 } finally { ()。 (i)。 } } } } catch (Exception ex) { ()。 } finally { 。 }
點擊復制文檔內(nèi)容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1