Ejemplo n.º 1
0
        public static void AddToAdmin(Student a)
        {
            string x = a.Pincodes.Substring(a.Pincodes.Length - 6);

            sql = string.Format("insert into T_Admin(ID,Password,Privilege) values ('{0}','{1}','{2}')", a.Id, x, 0);
            DBAcess.ExecSqlCommand(sql);
        }
Ejemplo n.º 2
0
 public static bool Add(Student a)
 {
     //string x=string.Format("insert into T_Stduent(id,name,classes,major,college,grade,sex,address,pincodes,imgurl) values ("+a.Id+","+a.Name+","+a.Classes+","+a.Major+","+a.College+","+a.Grade+","+a.Sex+","+a.Address+","+a.Pincodes+","+a.Imgurl+")");
     sql = string.Format("insert into T_Student(id,name,classes,major,college,grade,sex,address,pincodes,imgurl,dayruxue) values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}')", a.Id, a.Name, a.Classes, a.Major, a.College, a.Grade, a.Sex, a.Address, a.Pincodes, a.Imgurl, a.DayRuxue);
     //sql = x;
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 3
0
 public static bool Delete(string id)
 {
     sql = string.Format("Delete T_Vacation where Number='{0}'", id);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 4
0
 public static bool UpdateAgree(Vacation a)
 {
     sql = string.Format("update T_Vacation set agreepeople='{0}' where Number='{1}'", a.agreepeople, a.number);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 5
0
 public static bool Add(Vacation a)
 {
     sql = string.Format("insert into T_Vacation(ID,name,type,reason,daystart,dayover,applytime,condition,Number) values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')", a.id, a.name, a.type, a.reason, a.daystart, a.dayover, a.applytime, a.condition, a.number);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 6
0
 public static bool Delete(int sid)
 {
     sql = string.Format("Delete T_Score where sid='{0}'", sid);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 7
0
 public static bool Update(Score a)
 {
     sql = string.Format("update T_Score set score='{0}' where sid='{1}' ", a.Scores, a.Sid);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 8
0
 public static bool Add(Score a)
 {
     sql = string.Format("insert into T_Score (cid,stuid,score) values ('{0}','{1}','{2}')", a.Cid, a.Stuid, a.Scores);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 9
0
 public static bool AddSL(SystemLog sl)
 {
     sql = string.Format("insert into T_SystemLog (Operator,Activity,Status,IPAdd,DetailInfo) values ('{0}','{1}','{2}','{3}','{4}') ", sl.Operator, sl.Activity, sl.Status, sl.IPAdd, sl.DetailInfo);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 10
0
 public static bool Delete(string id)
 {
     sql = string.Format("Delete T_Student where id='{0}'", id);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 11
0
 public static bool Update(Student a)
 {
     sql = string.Format("update T_Student set name='{0}',political='{1}',grade='{2}',class='{3}',address='{4}',phone='{5}',sex='{6}',pincodes='{7}',img='{8}' where ID='{9}'", a.Name, a.Political, a.Grade, a.class1, a.Address, a.Phone, a.Sex, a.Pincodes, a.Imgurl, a.Id);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 12
0
 public static bool Add(Student a)
 {
     sql = string.Format("insert into T_Student(ID,name,sex,political,pincodes,grade,class,address,phone,main,img) values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}')", a.Id, a.Name, a.Sex, a.Political, a.Pincodes, a.Grade, a.class1, a.Address, a.Phone, a.Main, a.Imgurl);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 13
0
 public static bool Update(Admin a)
 {
     sql = string.Format("update T_Admin set Password='******',Privilege='{1}' where ID='{2}' ", a.Password, a.Privilege, a.Id);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 14
0
 public static bool Add(Admin a)
 {
     sql = string.Format("insert into T_Admin (ID,Password,Privilege) values ('{0}','{1}','{2}')", a.Id, a.Password, a.Privilege);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 15
0
 public static bool Delete(String id)
 {
     sql = string.Format("delete T_Admin where id='{0}'", id);
     return(DBAcess.ExecSqlCommand(sql));
 }
Ejemplo n.º 16
0
 public static bool Update(Student a)
 {
     sql = string.Format("update T_Student set name='{0}',classes='{1}',major='{2}',college='{3}',grade='{4}',sex='{5}',address='{6}',pincodes='{7}',imgurl='{8}' where id='{9}'", a.Name, a.Classes, a.Major, a.College, a.Grade, a.Sex, a.Address, a.Pincodes, a.Imgurl, a.Id);
     return(DBAcess.ExecSqlCommand(sql));
 }