.NetѧÉúËÞÉá¹ÜÀíϵͳ

.NetѧÉúËÞÉá¹ÜÀíϵͳ

SqlCommand cmd = new SqlCommand(\, conn); cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add(\, SqlDbType.VarChar, 20).Value = HouseId; cmd.Parameters.Add(\, SqlDbType.VarChar, 20).Value = DormitoryId; using (SqlDataReader DR =

cmd.ExecuteReader(CommandBehavior.CloseConnection)) {

while (DR.Read()) {

View_StudentInfo V_myStudnet = new View_StudentInfo(); V_myStudnet.Id = Convert.ToInt32(DR[\]);

V_myStudnet.StudentId = Convert.ToString(DR[\]); V_myStudnet.StudentName = Convert.ToString(DR[\]); V_myStudnet.StudentPwd = Convert.ToString(DR[\]); V_myStudnet.Sex = Convert.ToString(DR[\]);

V_myStudnet.DepartmentNo = Convert.ToString(DR[\]); V_myStudnet.GradeName = Convert.ToString(DR[\]); V_myStudnet.ProfessionalNo = Convert.ToString(DR[\]); V_myStudnet.ClassName = Convert.ToString(DR[\]); V_myStudnet.HouseId = Convert.ToString(DR[\]); V_myStudnet.DormitoryId = Convert.ToString(DR[\]); V_myStudnet.BadId = Convert.ToString(DR[\]); V_myStudnet.DepartmentName = Convert.ToString(DR[\]);

V_myStudnet.ProfessionalName =

Convert.ToString(DR[\]);

V_Students.Add(V_myStudnet); }

DR.Close(); DR.Dispose();

}

conn.Close(); conn.Dispose(); }

return V_Students;

}

public void StudentInfo_Delete(string Id) {

SqlParameter[] paramters = {

new SqlParameter(\,SqlDbType.Int,4) }; paramters[0].Value = Id;

Ô´Âë¼°ÎĵµÏÂÔØµØÖ·£ºhttp://www.51aspx.com/Code/DormitoryManage

.NetѧÉúËÞÉá¹ÜÀíϵͳ

DbHelperSQL.RunProcedure(\, paramters);

}

public void StudentInfo_Add(string StudentId, string StudentName, string Pwd, string Sex, string DepartNo, string Grade, string ProNo, string ClassName, string HouseId, string DormitoryId, string BedId) {

SqlParameter[] parameters = {

new SqlParameter(\,SqlDbType.NVarChar,20), new

SqlParameter(\,SqlDbType.NVarChar,20),

new SqlParameter(\,SqlDbType.VarChar,20), new SqlParameter(\,SqlDbType.NVarChar,20),

new SqlParameter(\,SqlDbType.VarChar,20), new SqlParameter(\,SqlDbType.NVarChar,20), newSqlParameter(\,SqlDbType.VarChar,20), new SqlParameter(\,SqlDbType.NVarChar,20), new SqlParameter(\,SqlDbType.VarChar,20), new SqlParameter(\,SqlDbType.VarChar,20), new SqlParameter(\,SqlDbType.NVarChar,20), }; parameters[0].Value = StudentId; parameters[1].Value = StudentName; parameters[2].Value = Pwd; parameters[3].Value = Sex; parameters[4].Value = DepartNo; parameters[5].Value = Grade; parameters[6].Value = ProNo; parameters[7].Value = ClassName; parameters[8].Value = HouseId; parameters[9].Value = DormitoryId; parameters[10].Value = BedId;

DbHelperSQL.RunProcedure(\, parameters);

}

Áù£®×ܽá

ͨ¹ýÕâ´Î±ÏÒµÉè¼Æ£¬Ê¹ÎÒ»ñµÃÁËѧϰרҵ֪ʶ¡¢·ÖÎöÎÊÌâ²¢½â¾öÎÊÌâµÄÄÜÁ¦£¬ÔÚÌá¸ß¼¼ÄܵÄͬʱ¸ü¼ÓÉî¿ÌµÄѧϰÁËAsp.netµÈµÄÏà¹Ø¼¼Êõ£¬ÒÔ¼°¶Ôphotoshop¡¢vs2008ºÍsql2005µÄ²Ù×÷¡£¹ý³ÌÖÐÓöµ½Á˸÷ÖÖ¸÷ÑùµÄÎÊÌ⣬ͨ¹ýÉÏÍøÌáÎʺÍËÑË÷µÈ¶àÖÖ·½Ê½×îÖÕÕÒµ½½â¾ö·½·¨

Ô´Âë¼°ÎĵµÏÂÔØµØÖ·£ºhttp://www.51aspx.com/Code/DormitoryManage

.NetѧÉúËÞÉá¹ÜÀíϵͳ

µÄϲÔÃÐÄÇéÊÇÎÒ¼á³ÖÍê³É±ÏÒµÉè¼ÆµÄ¶¯Á¦¡£·Ç³£¸ÐÐ»Ôø¾­°ïÖú¹ýÎÒµÄÀÏʦÃÇ¡¢Í¬Ñ§ÃÇ»¹ÓÐÍøÉÏËØ²»ÏàʶµÄÍøÓÑ£¬ÔÚÎÒÓöµ½À§ÄÑʱ¸øÓëÁËÎҺܴóµÄ°ïÖú£¬ËûÃǵÄÄÍÐÄÓëרҵ֪ʶ¶ÔÎÒ×îÖÕÍê³ÉÕâ·Ý±ÏÒµÉè¼ÆÆðןܴóµÄ×÷Óã¬Í¬Ê±Ò²Ê¹ÎÒÕÆÎÕÁ˸ü¶à½â¾öÎÊÌâµÄ¼¼ÇÉ£¬Óöµ½ÎÊÌâ²»¿ÉÅ£¬Ö»ÒªÏ¸Ðĵ÷ÊÔºó£¬ÕÒµ½ÎÊÌâ´æÔÚµÄÔ­Òò£¬²ÅÄÜʹ×Ô¼ºµÃµ½½ø²½¡£ÔÚÓöµ½ÎÊÌâµÄͬʱ£¬¸ü·¢ÏÖÁË×Ô¼º»ù´¡ÖªÊ¶µÄ±¡Èõ£¬¸ÐÊܵ½C#Óï·¨µÄÖØÒªÐÔ¡£Õâ¸öϵͳÈÔ´æÔÚÐí¶àµÄ²»×㣬ÓÉÓÚʱ¼äÓÐÏÞ£¬Ò³ÃæÃ»ÓÐ×ÐϸµÄÍê³É£¬ÓÐЩ¹¦ÄÜ»¹Ã»ÓÐʵÏÖ¡£Ôڴ˴αÏÒµÉè¼Æºó£¬ÎÒ½«Ã÷È·Ä¿±ê£¬´òºÃ×Ô¼ºµÄרҵ»ù´¡£¬ÕùÈ¡¿ª·¢³ö¸ü°²È«¸ßЧµÄÐÅÏ¢»¯ÍøÕ¾¡£

²Î¿¼ÎÄÏ×

[1] ÐìÈË·ï£¬Ôø½¨»ª£ºSQL Server 2000Êý¾Ý¿â¼°Ó¦ÓÃ[M]£¬±±¾©£º¸ßµÈ½ÌÓý³ö°æÉ磬2006.12.

[2] Áõ¹úÇ죬ÄôÔªÃú£ºASP.NETÆóÒµ¼¶¿ª·¢ °¸Àý¾«½â£¨C#±à³Ìƪ£©[M]£¬ÈËÃñÓʵç³ö°æÉç2006.2.

[3] ÕÅÁ죺ASP.NETÏîÄ¿¿ª·¢È«³Ìʵ¼[M]£¬Ç廪´óѧ³ö°æÉç2008.6. [4] °²Ð¡Áú£ºAdobe PhotoshopµäÐÍÓ¦ÓÃʵÀý-ÍøÒ³Éè¼ÆÆª[M].

Ô´Âë¼°ÎĵµÏÂÔØµØÖ·£ºhttp://www.51aspx.com/Code/DormitoryManage

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ìæ»»Îª@)