当前位置: 首页>>代码示例>>C#>>正文


C# ClassConnectDB.DeleteValue方法代码示例

本文整理汇总了C#中DAL.ClassConnectDB.DeleteValue方法的典型用法代码示例。如果您正苦于以下问题:C# ClassConnectDB.DeleteValue方法的具体用法?C# ClassConnectDB.DeleteValue怎么用?C# ClassConnectDB.DeleteValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DAL.ClassConnectDB的用法示例。


在下文中一共展示了ClassConnectDB.DeleteValue方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: deleteHomeWorkByTeacher

        public static bool deleteHomeWorkByTeacher(string num, string tchid)
        {
            try
            {
                ClassConnectDB conn = new ClassConnectDB();
                string sql = "DELETE FROM Homework Where ([email protected]) AND  ([email protected])";
                string addvalue = "@num,@tchid";
                string value = num + "," + tchid;
                bool delete = conn.DeleteValue(sql, addvalue, value);
                if (delete) { return true; }
                else { return false; }

            }
            catch (Exception)
            {
                return false;
            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:18,代码来源:ClassRoom.cs

示例2: deleteStudentInclass

        public static bool deleteStudentInclass(string id, string dchID)
        {

            try
            {
                ClassConnectDB conn = new ClassConnectDB();

                string sqlcheckEnrollInCheckname = @"SELECT  CheckName.CheckName_ID  FROM  CheckName INNER JOIN
                      EnrollIn ON CheckName.Enroll_ID = EnrollIn.Enroll_ID WHERE(EnrollIn.DetailTech_ID = '" + dchID + "') AND (EnrollIn.Std_Campus_Code = '" + id + "')";

                SqlDataReader drrcheckNameinroll = conn.SelectSqlDataReader(sqlcheckEnrollInCheckname);
                if (drrcheckNameinroll.HasRows)
                {

                    string deleteCheckName = @"DELETE FROM CheckName WHERE CheckName_ID  in ( SELECT  CheckName.CheckName_ID  FROM  CheckName INNER JOIN
                      EnrollIn ON CheckName.Enroll_ID = EnrollIn.Enroll_ID WHERE(EnrollIn.DetailTech_ID = @deid) AND (EnrollIn.Std_Campus_Code = @id))";
                    string addvalueDelete = "@deid,@id";
                    string valuedelete = dchID + "," + id;
                    conn.DeleteValue(deleteCheckName, addvalueDelete, valuedelete);

                    string sqlinsert = "DELETE FROM EnrollIn WHERE [email protected] AND  [email protected]";
                    string addvalue = "@id,@dchID";
                    string value = id + "," + dchID;
                    conn.InsertValue(sqlinsert, addvalue, value);

                }
                conn.Close();
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:34,代码来源:ClassRoom.cs

示例3: deleteFileMedia

        public static bool deleteFileMedia(string id)
        {
            string sql = "DELETE FROM InstructionMedia Where  [email protected]";
            string Addvalue = "@id";
            string value = id;
            ClassConnectDB conn = new ClassConnectDB();
            return conn.DeleteValue(sql, Addvalue, value);

        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:9,代码来源:ClassRoom.cs

示例4: delectClassRoom

        public static bool delectClassRoom(string ClassRoomID)
        {
            try
            {
                ClassConnectDB conn = new ClassConnectDB();
                string delete = "DELETE FROM ClassRoom WHERE [email protected]";
                string Addvalue = "@classid";
                string value = ClassRoomID;

                bool checkdel = conn.DeleteValue(delete, Addvalue, value);
                if (checkdel)
                {
                    return true;
                }
                return false;

            }
            catch (Exception)
            {
                return false;
            }

        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:23,代码来源:ClassRoom.cs

示例5: deleteDeatilTeach

        public static bool deleteDeatilTeach(string detailID)
        {
            try
            {
                ClassConnectDB conn = new ClassConnectDB();
                string delClassroom = "";

                string check = "select count( ClassRoom_ID ) as countRoom  FROM DetailTech Where ( ShowPlan_ID in ( select ShowPlan_ID From DetailTech Where DetailTech_ID = (" + detailID + "))  and Tch_ID = ( select Tch_ID From DetailTech Where DetailTech_ID in (" + detailID + ")))";
                SqlDataReader dr = conn.SelectSqlDataReader(check); ;
                int count = 0;
                while (dr.Read())
                {
                    count = Convert.ToInt32(dr["countRoom"].ToString());
                }


                string selectClassRoom_ID = "select  distinct ClassRoom_ID as id  FROM DetailTech Where ShowPlan_ID in ( select ShowPlan_ID From DetailTech Where DetailTech_ID in (" + detailID + "))";
                SqlDataReader ddr = conn.SelectSqlDataReader(selectClassRoom_ID);
                while (ddr.Read())
                {
                    delClassroom = ddr["id"].ToString();
                }


                string sql = "DELETE FROM DetailTech Where  [email protected]";
                string Addvalue = "@id";
                string value = detailID;
                bool del = conn.DeleteValue(sql, Addvalue, value);

                if (count == 1)
                {
                    delectClassRoom(delClassroom);
                }



                conn.Close();
                return true;
            }

            catch (Exception)
            {
                return false;
            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:45,代码来源:ClassRoom.cs

示例6: deleteInManageCurriculumPage

        public static bool deleteInManageCurriculumPage(string year)
        {

            try
            {
                string sql = "DELETE FROM Curriculum Where  Curri_Year = @year";
                string Addvalue = "@year";
                string value = year;

                ClassConnectDB conn = new ClassConnectDB();
                conn.DeleteValue(sql, Addvalue, value);
                return true;
            }
            catch (Exception)
            {
                return false;

            }
            
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:20,代码来源:Curriculum.cs

示例7: confirmSaveInAddCurriculum

        public static bool confirmSaveInAddCurriculum()
        {
            try
            {
                string checkID = " SELECT Curri_Id FROM Curriculum WHERE Curri_Year='' OR Curri_Course='' OR Curri_Group='' ";

                ClassConnectDB conn = new ClassConnectDB();
                SqlDataReader readID = conn.SelectSqlDataReader(checkID);

                while (readID.Read()) {
                    string id = readID["Curri_Id"].ToString();
                    string delete = "DELETE FROM Curriculum WHERE [email protected]";
                    string Addvalue = "@id";
                    string value = id;
                     conn.DeleteValue(delete,Addvalue,value);
                }

                return true;
            }
            catch (Exception)
            {

                return false;
            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:25,代码来源:Curriculum.cs

示例8: deletePlanEducate

        public static bool deletePlanEducate(string planid)
        {

            try
            {
                string sql = "DELETE FROM ShowPlanEducate Where  ShowPlan_Id = @id";
                string Addvalue = "@id";
                string value = planid;

                ClassConnectDB conn = new ClassConnectDB();
                conn.DeleteValue(sql, Addvalue, value);
                return true;
            }
            catch (Exception)
            {
                return false;

            }
            

        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:21,代码来源:Curriculum.cs

示例9: deleteSubjectFollowSubject

        public static bool deleteSubjectFollowSubject(string code,string codePass)
        {
            try
            {
                string sql = "DELETE FROM FollowSubject Where  StructSub_Code = @code AND [email protected]";
                string Addvalue = "@code,@codepass";
                string value = code+","+codePass;

                ClassConnectDB conn = new ClassConnectDB();
                conn.DeleteValue(sql, Addvalue, value);
                return true;
            }
            catch (Exception)
            {
                return false;

            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:18,代码来源:Curriculum.cs

示例10: deleteSubject

        public static bool deleteSubject(string code)
        {
            try
            {
                string sql = "DELETE FROM StructSubject Where  StructSub_Code = @code";
                string Addvalue = "@code";
                string value = code;

                string sqlDeleteFollowsubject = "DELETE FROM FollowSubject where StructSub_Code = @code";
                ClassConnectDB conn = new ClassConnectDB();
                conn.DeleteValue(sql,Addvalue,value);

                conn.DeleteValue(sqlDeleteFollowsubject,Addvalue,value);

                return true;
            }
            catch (Exception)
            {
                return false;
               
            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:22,代码来源:Curriculum.cs

示例11: deleteUserDelete

        public static bool deleteUserDelete(string id)
        {
            try
            {
                string sqldelete = "DELETE FROM Teacher Where [email protected] ";
                string Addvalue = "@id";
                string value = id;

                ClassConnectDB conn = new ClassConnectDB();
                conn.DeleteValue(sqldelete, Addvalue, value);
                conn.Close();
                return true;
            }
            catch (Exception)
            {
                return false;
            }

        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:19,代码来源:Teacher.cs

示例12: deleteUserStudent

        public static bool deleteUserStudent(string id)
        {
            try
            {
                string sqldelete = "DELETE FROM Student Where [email protected] ";
                string Addvalue = "@id";
                string value = id;

                ClassConnectDB conn = new ClassConnectDB();
                conn.DeleteValue(sqldelete, Addvalue, value);
                conn.Close();
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
开发者ID:AppCPC,项目名称:WebComSci,代码行数:18,代码来源:Student.cs


注:本文中的DAL.ClassConnectDB.DeleteValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。