⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grd_mis_1.cs

📁 一个研究生管理系统 具体的情况自己看了
💻 CS
📖 第 1 页 / 共 3 页
字号:
 
        }
        public static DataRow GetData_ScholarApply_1(int id)
        {
            //返回ScholarApp,ScholarInfo和StudentInfo三表联合中ScholarshipAppID=id的信息表
            //返回的datatable中应包含StuName,Enable,ScholarshipName和ScholarApp表中所有信息
            //失败返回NULL
            DataTable dt = new DataTable();
            string sqlString = "SELECT StuName,Enable,ScholarshipName,ScholarshipAppID,ScholarApp.ScholarshipInfoID,ScholarApp.StuID,ScholarshipResume,ScholarApp.IsChecked,GetScholarDate,ScholarApp.FileName,ScholarApp.Remark FROM ScholarApp,ScholarInfo,StudentInfo WHERE StudentInfo.StuID = ScholarApp.StuID AND ScholarApp.ScholarshipInfoID = ScholarInfo.ScholarshipInfoID AND ScholarApp.ScholarshipAppID =" + id.ToString();
            /***********************************************************************************
              *SELECT StuName,Enable,ScholarshipName,ScholarshipAppID,                           *
              *       ScholarApp.ScholarshipInfoID,ScholarApp.StuID,ScholarshipResume,           *
              *       IsChecked,GetScholarDate,ScholarApp.FileName,ScholarApp.Remark             *
              *FROM ScholarApp,ScholarInfo,StudentInfo                                           *
              *WHERE StudentInfo.StuID = ScholarApp.StuID                                        *
              *      AND ScholarApp.ScholarshipInfoID = ScholarInfo.ScholarshipInfoID            *
              *      AND ScholarApp.ScholarshipAppID =" + id.ToString()                          *
              ************************************************************************************/
            try
            {
                dt = Query.ProcessSql(sqlString, "GradMIS_Data");
            }
            catch //(PlException exp)
            {
                return null;
            }
            return dt.Rows[0];

        }



        public static DataTable GetData_LoanInfo()
        {
            //返回LoanInfo和StudentInfo表中所有有效数据
            //返回时按ID降序排列
            //返回时按ID降序排列LoanInfo表所有信息和StudentInfo表中的StuName
            //失败返回NULL
            DataTable dt = new DataTable();
            string sqlString = "SELECT LoanID,LoanInfo.StuID,IsLoan,LoanData,LoanMoney,LoanInfo.Remark,StuName FROM LoanInfo,StudentInfo WHERE StudentInfo.StuID = LoanInfo.StuID  ORDER BY LoanInfo.LoanID DESC";
            /************************************************************************************
             * SELECT LoanID,LoanInfo.StuID,IsLoan,LoanData,LoanMoney,LoanInfo.Remark,StuName     *
             * FROM LoanInfo,StudentInfo                                                          *
             * WHERE StudentInfo.StuID = LoanInfo.StuID                                           * 
             * ORDER BY LoanInfo.LoanID DESC                                                    *
             **************************************************************************************/
            try
            {
                dt = Query.ProcessSql(sqlString,"GradMIS_Data");
            }
            catch//(PlException exp)
            {
            return null;
            }
            return dt;
        }
        public static bool DelData_OneReport(int id)
        {
            //删除数据库学术报告信息表的ReportID=id的一条记录
            //ReportInfoEntity reportInfo = new ReportInfoEntity();


            DeleteCriteria dc = new DeleteCriteria(typeof(ReportInfoEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(ReportInfoEntity.__REPORTID, id);


                try
                {
                    int re = dc.Perform();
                    if (re > 0)
                        return true;
                    else
                        return false;
                }
                catch
                {
                    return false;
                }

 
        }
        public static bool DelData_OneReportJoiner(int id)
        {
            //删除参加学术报告人员名单表中JoinReportStuID=id的信息
            
            DeleteCriteria dc = new DeleteCriteria(typeof(JoinReportStuEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(JoinReportStuEntity.__JOINREPORTSTUID, id);
            try
            {
                int re = dc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
        }
        public static bool DelData_OneActivity(int id)
        {
            //删除数据库学生活动信息表中ActivityID=id的一列
            DeleteCriteria dc = new DeleteCriteria(typeof(ActivityInfoEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(ActivityInfoEntity.__ACTIVITYID, id);
            try
            {
                int re = dc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
 
        }
        public static bool DelData_OneActivityJioner(int id)
        {
            //删除参加活动人员名单表中JoinActivStuID=id的数据
            DeleteCriteria dc = new DeleteCriteria(typeof(JoinActivStuEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(JoinActivStuEntity.__JOINACTIVSTUID, id);
            try
            {
                int re = dc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
        }
        public static bool DelData_OneExcellInfo(int id)
        {
            //删除ExcellInfo表中ExcellenceInfoID=id的那一条记录
            DeleteCriteria dc = new DeleteCriteria(typeof(ExcellInfoEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(ExcellInfoEntity.__EXCELLENCEINFOID, id);
            try
            {
                int re = dc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
        }
        public static bool DelData_OneScholarInfo(int id)
        {
            //删除ScholarInfo表中ScholarshipInfoID=id的那一条记录
            DeleteCriteria dc = new DeleteCriteria(typeof(ScholarInfoEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(ScholarInfoEntity.__SCHOLARSHIPINFOID, id);
            try
            {
                int re = dc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
           
        }
        public static bool DelData_OneLoanInfo(int id)
        {
            //删除LoanInfo表中LoanID=id的那一条记录
            DeleteCriteria dc = new DeleteCriteria(typeof(LoanInfoEntity));
            Condition c = dc.GetNewCondition();
            c.AddEqualTo(LoanInfoEntity.__LOANID, id);
            try
            {
                int re = dc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
 
        }
        public static bool SetData_ExcellInfoEnableValue(int id,int value)
        {
            //ExcellInfo表中ExcellenceInfoID=id
            //将Enable的值社为value
            UpdateCriteria uc = new UpdateCriteria(typeof(ExcellInfoEntity));
            Condition c1 = uc.GetNewCondition();
            c1.AddEqualTo(ExcellInfoEntity.__EXCELLENCEINFOID,id);
            uc.AddAttributeForUpdate(ExcellInfoEntity.__ENABLE,value);
            try
            {
                int re = uc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch //(PlException e)
            {
                return false;
            }
        }
        public static bool SetData_ExcellApp(int ExcellenceID, DateTime GetExcellDate, int IsChecked, String Remark)
        {
            //ExcellApp表中ExcellenceID=ExcellenceID
            //将后面三项数据更新
           
            UpdateCriteria uc = new UpdateCriteria(typeof(ExcellAppEntity));
            Condition c1 = uc.GetNewCondition();
            c1.AddEqualTo(ExcellAppEntity.__EXCELLENCEID, ExcellenceID);
            uc.AddAttributeForUpdate(ExcellAppEntity.__GETEXCELLDATE, GetExcellDate);
            uc.AddAttributeForUpdate(ExcellAppEntity.__ISCHECKED, IsChecked);
            uc.AddAttributeForUpdate(ExcellAppEntity.__REMARK, Remark);
            try
            {
                int re = uc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch //(PlException e)
            {
                return false;
            }
 
        }
        public static bool SetData_ScholarInfoEnableValue(int id,int value)
        {
            //ScholarInfo表中ScholarshipInfoID=id
            //将Enable的值社为value
            UpdateCriteria uc = new UpdateCriteria(typeof(ScholarInfoEntity));
            Condition c = uc.GetNewCondition();
            c.AddEqualTo(ScholarInfoEntity.__SCHOLARSHIPINFOID, id);
            uc.AddAttributeForUpdate(ScholarInfoEntity.__ENABLE, value);
            try
            {
                int re = uc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;

            }
            catch
            {
                return false;
            }
        }
        public static bool SetData_ScholarApp(int ScholarshipAppID, DateTime GetScholarDate, int IsChecked, String Remark)
        {
            //_ScholarAp表中ScholarshipAppID=ScholarshipAppID
            //将后面三项数据更新
            UpdateCriteria uc = new UpdateCriteria(typeof(ScholarAppEntity));
            Condition c = uc.GetNewCondition();
            c.AddEqualTo(ScholarAppEntity.__SCHOLARSHIPAPPID, ScholarshipAppID);
            uc.AddAttributeForUpdate(ScholarAppEntity.__GETSCHOLARDATE, GetScholarDate);
            uc.AddAttributeForUpdate(ScholarAppEntity.__ISCHECKED, IsChecked);
            uc.AddAttributeForUpdate(ScholarAppEntity.__REMARK, Remark);
            try
            {
                int re = uc.Perform();
                if (re > 0)
                    return true;
                else
                    return false;
            }
            catch
            {
                return false;
            }
 
        }


    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -