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


C# AccessHelper.DeletedValues方法代码示例

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


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

示例1: ABUDTMultipleRecordDelete

        /// <summary>
        /// 刪除綜合紀錄表 複選記錄
        /// </summary>
        /// <param name="dataList"></param>
        public static void ABUDTMultipleRecordDelete(List<UDTMultipleRecordDef> dataList)
        {
            if (dataList.Count > 0)
            {
                AccessHelper accHelper = new AccessHelper();
                foreach (UDTMultipleRecordDef data in dataList)
                    data.Deleted = true;

                accHelper.DeletedValues(dataList);
            }
        }
开发者ID:ChunTaiChen,项目名称:Counsel_System,代码行数:15,代码来源:UDTTransfer.cs

示例2: UDTSuggestListDelete

        /// <summary>
        /// 刪除多筆建議重修名單
        /// </summary>
        /// <param name="dataList"></param>
        public static void UDTSuggestListDelete(List<UDTSuggestListDef> dataList)
        {
            if (dataList.Count > 0)
            {
                foreach (UDTSuggestListDef data in dataList)
                    data.Deleted = true;

                AccessHelper accessHelper = new AccessHelper();
                accessHelper.DeletedValues(dataList);
            
            }
        }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:16,代码来源:UDTTransfer.cs

示例3: UDTStudentFitnessRecordListDelete

 /// <summary>
 /// 刪除學生體適能資料
 /// </summary>
 /// <param name="DataList"></param>
 public static void UDTStudentFitnessRecordListDelete(List<UDT_StudentFitnessRecord> DataList)
 {
     if (DataList.Count > 0)
     {
         foreach (UDT_StudentFitnessRecord data in DataList)
         {
             // Deleted 設成 true 才會真刪除
             data.Deleted = true;
         }
         AccessHelper accessHelper = new AccessHelper();
         accessHelper.DeletedValues(DataList);
     }
 }
开发者ID:ChunTaiChen,项目名称:ischool_fitness,代码行数:17,代码来源:UDTTransfer.cs

示例4: SaveByRecordList

        /// <summary>
        /// 更新設定
        /// </summary>
        /// <param name="rec"></param>
        public static void SaveByRecordList(List<TagMappingRecord> recList)
        {
            List<TagMappingRecord> dataList = new List<TagMappingRecord>();

            AccessHelper accessHelper = new AccessHelper();

            // 先刪除所有資料
            dataList = accessHelper.Select<TagMappingRecord>();
            accessHelper.DeletedValues(dataList);

            if (recList.Count > 0)
            {
                // 新增此次所有資料
                accessHelper.InsertValues(recList);
            }
        }
开发者ID:redolin,项目名称:K12.Report.ZhuengtouPointsCompetition,代码行数:20,代码来源:TagMapping.cs

示例5: button4_Click

        private void button4_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("您確定要刪除這個系所組別?", "注意!", MessageBoxButtons.YesNo, MessageBoxIcon.Information) != System.Windows.Forms.DialogResult.Yes)
                return;

            List<ActiveRecord> recs = new List<ActiveRecord>();
            foreach(DataGridViewRow row in this.dataGridView1.SelectedRows)
            {
                recs.Add((UDT.DepartmentGroup)row.Tag);
            }
            AccessHelper ah = new AccessHelper();
            try
            {
                ah.DeletedValues(recs);
                this.RefreshData();
            }
            catch (Exception ex)
            {
                Util.ShowMsg("刪除科目資料時發生錯誤!", "注意!");
            }
        }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:21,代码来源:DepartmentGroupForm.cs

示例6: DeleteCounselUserDefineDataList

 /// <summary>
 /// 刪除多筆輔導使用者自訂欄位
 /// </summary>
 /// <param name="dataList"></param>
 public void DeleteCounselUserDefineDataList(List<UDT_CounselUserDefDataDef> dataList)
 {
     List<UDT_CounselUserDefDataDef> dtList = new List<UDT_CounselUserDefDataDef>();
     foreach (UDT_CounselUserDefDataDef rec in dataList)
     {
         rec.Deleted = true;
         dtList.Add(rec);
     }
     AccessHelper accessHelper = new AccessHelper();
     accessHelper.DeletedValues(dtList);
 }
开发者ID:ChunTaiChen,项目名称:Counsel_System,代码行数:15,代码来源:UDTTransfer.cs

示例7: DeleteCounselStudentList

 /// <summary>
 /// 刪除多筆學生輔導老師
 /// </summary>
 /// <param name="CounselStudent_List"></param>
 public void DeleteCounselStudentList(List<DAO.UDT_CounselStudent_ListDef> CounselStudent_List)
 {
     List<UDT_CounselStudent_ListDef> DelCounselStudentList = new List<UDT_CounselStudent_ListDef>();
     foreach (UDT_CounselStudent_ListDef rec in CounselStudent_List)
     {
         rec.Deleted = true;
         DelCounselStudentList.Add(rec);
     }
     AccessHelper accessHelper = new AccessHelper();
     accessHelper.DeletedValues(DelCounselStudentList.ToArray());
 }
开发者ID:ChunTaiChen,项目名称:Counsel_System,代码行数:15,代码来源:UDTTransfer.cs

示例8: DeleteDataToUDT_StudTypeWeight

 /// <summary>
 /// 刪除 UDT_StudTypeWeight 內資料
 /// </summary>
 /// <param name="data"></param>
 public static void DeleteDataToUDT_StudTypeWeight(List<UserDefData_StudTypeWeight> data)
 {
     AccessHelper accHelper = new AccessHelper();
     accHelper.DeletedValues(data.ToArray());
 }
开发者ID:ChunTaiChen,项目名称:JointAdmissionModule,代码行数:9,代码来源:UDTTransfer.cs

示例9: btnAdd_Click

        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (this.dataGridViewX2.SelectedRows.Count < 1)
            {
                return;
            }

            List<ActiveRecord> addRecs = new List<ActiveRecord>();
            List<ActiveRecord> delRecs = new List<ActiveRecord>();
            this.btnAdd.Enabled = false;

            foreach (DataGridViewRow row in this.dataGridViewX2.SelectedRows)
            {
                SHCourseRecord course = (SHCourseRecord)row.Tag;
                //如果原本是被標註退選的,應該要把該退選紀錄移除
                if (this.dicAddDropList.ContainsKey(course.ID))
                {
                    if (this.dicAddDropList[course.ID].AddOrDrop.ToUpper() == this.dropCourse)
                    {
                        delRecs.Add(this.dicAddDropList[course.ID]);
                    }
                }
                else
                {
                    UDT.AddDropCourse ad = new UDT.AddDropCourse();
                    ad.StudentID = int.Parse(this.PrimaryKey);
                    ad.CourseID = int.Parse(course.ID);
                    ad.AddOrDrop = this.addCourse;
                    addRecs.Add(ad);
                }
            }
            try
            {
                AccessHelper ah = new AccessHelper();
                if (delRecs.Count > 0)  ah.DeletedValues(delRecs);
                if (addRecs.Count > 0) ah.InsertValues(addRecs);
                this.OnPrimaryKeyChanged(EventArgs.Empty);
                this.saveLogs(delRecs, addRecs);
            }
            catch (Exception ex)
            {
                Util.ShowMsg(ex.Message, "加選課程");
                this.btnAdd.Enabled = true;
            }

            //this.btnAdd.Enabled = true ;    //應該要等資料讀取完後才 enabled,  2012/5/2, kevin.
        }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:47,代码来源:Student_AddDropCourse.cs

示例10: DeleteCourse

        private static void DeleteCourse()
        {
            if (RetakeAdmin.Instance.SelectedSource.Count > 0)
            {
                DialogResult dr = MsgBox.Show("您確定要刪除課程?\n\n本功能將會串連刪除:\n(課程,修課學生,成績,缺曠)", MessageBoxButtons.YesNo, MessageBoxDefaultButton.Button2);
                if (dr == DialogResult.Yes)
                {
                    AccessHelper _accessHelper = new AccessHelper();

                    //刪缺曠
                    List<UDTAttendanceDef> attendanceList = _accessHelper.Select<UDTAttendanceDef>("ref_course_id in ('" + string.Join("','", RetakeAdmin.Instance.SelectedSource) + "')");
                    _accessHelper.DeletedValues(attendanceList);

                    //時間區間
                    List<UDTTimeSectionDef> timeSectionList = _accessHelper.Select<UDTTimeSectionDef>("ref_course_id in ('" + string.Join("','", RetakeAdmin.Instance.SelectedSource) + "')");
                    _accessHelper.DeletedValues(timeSectionList);

                    //刪學生
                    List<UDTScselectDef> cselectList = _accessHelper.Select<UDTScselectDef>("ref_course_id in ('" + string.Join("','", RetakeAdmin.Instance.SelectedSource) + "')");
                    _accessHelper.DeletedValues(cselectList);

                    //刪課程
                    List<UDTCourseDef> courseList = _accessHelper.Select<UDTCourseDef>("UID in ('" + string.Join("','", RetakeAdmin.Instance.SelectedSource) + "')");
                    _accessHelper.DeletedValues(courseList);

                    MsgBox.Show("刪除成功!!");
                    RetakeEvents.RaiseAssnChanged();
                }
            }
            else
            {
                MsgBox.Show("請選擇課程!!");
            }
        }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:34,代码来源:Program.cs

示例11: UDTScoreInputDateDelete

        /// <summary>
        /// 刪除 成績輸入時間
        /// </summary>
        /// <param name="dataList"></param>
        public static void UDTScoreInputDateDelete(List<UDTScoreInputDateDef> dataList)
        {
            AccessHelper accessHelper = new AccessHelper();
            foreach (UDTScoreInputDateDef data in dataList)
                data.Deleted = true;

            accessHelper.DeletedValues(dataList);
        }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:12,代码来源:UDTTransfer.cs

示例12: UDTWeightProportionDelete

        /// <summary>
        /// 刪除成績計算比例原則
        /// </summary>
        /// <param name="dataList"></param>
        public static void UDTWeightProportionDelete(List<UDTWeightProportionDef> dataList)
        {
            foreach (UDTWeightProportionDef data in dataList)
                data.Deleted = true;

            AccessHelper _accessHelper = new AccessHelper();
                _accessHelper.DeletedValues(dataList);
        }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:12,代码来源:UDTTransfer.cs

示例13: UDTSCSelectDelete

 /// <summary>
 /// 刪除多筆修課
 /// </summary>
 /// <param name="DataList"></param>
 public static void UDTSCSelectDelete(List<UDTScselectDef> DataList)
 {
     if (DataList.Count > 0)
     {
         AccessHelper accessHelper = new AccessHelper();
         foreach (UDTScselectDef data in DataList)
             data.Deleted = true;
         accessHelper.DeletedValues(DataList);
     }
 }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:14,代码来源:UDTTransfer.cs

示例14: UDTCourseTimetableDelete

 /// <summary>
 /// 刪除多筆課表
 /// </summary>
 /// <param name="dataList"></param>
 public static void UDTCourseTimetableDelete(List<UDTCourseTimetableDef> dataList)
 {
     if (dataList.Count > 0)
     {
         AccessHelper accessHelper = new AccessHelper();
         foreach (UDTCourseTimetableDef data in dataList)
             data.Deleted = true;
             
         accessHelper.DeletedValues(dataList);
     }
 }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:15,代码来源:UDTTransfer.cs

示例15: OnSaveData

        protected override void OnSaveData()
        {
            if (!this.is_validated())
            {
                MessageBox.Show("請先修正錯誤再儲存。");
                return;
            }
            //Delete All Records
            List<ActiveRecord> deleteRecs = new List<ActiveRecord>();
            foreach (UDT.CourseInstructor ci in this.records)
            {
                deleteRecs.Add(ci);
            }

            //Save new Record
            List<ActiveRecord> insertRecs = new List<ActiveRecord>();

            foreach (DataGridViewRow row in this.dataGridViewX1.Rows)
            {
                if (!row.IsNewRow)
                {
                    UDT.CourseInstructor ins = new UDT.CourseInstructor();
                    //SHSchool.Data.SHTCInstructRecord tcr = new SHTCInstructRecord();
                    ins.CourseID = int.Parse(this.PrimaryKey);
                    ins.TeacherID = int.Parse(row.Cells[1].Value.ToString());
                    ins.TagID = int.Parse(row.Cells[0].Value.ToString());
                    //ins.Role = row.Cells[1].Value.ToString(); //此欄位已不再使用。2012/3/16, kevin.
                    ins.IsScored = (row.Cells["IsScored"].Value != null && (bool)row.Cells["IsScored"].Value);
                    /*
                    if (row.Cells["IsScored"].Value != null && (bool)row.Cells["IsScored"].Value)
                    {
                        // item is checked
                        ins.IsScored = true;
                    }
                    else
                    {
                        // item is null
                        ins.IsScored = false;
                    }
                    */
                    insertRecs.Add(ins);
                }
            }

            AccessHelper ah = new AccessHelper();
            //delete
            //if (this.deletedList.Count > 0)
            ah.DeletedValues(deleteRecs);

            //insert
            if (insertRecs.Count > 0)
                ah.SaveAll(insertRecs);

            this.OnPrimaryKeyChanged(EventArgs.Empty);

            ResetDirtyStatus();

            /* ====  Log  for deleted records =====*/
            /*
            foreach (UDT.CourseInstructor ci in this.records)
            {
                Log.LogAgent agt = new Log.LogAgent();
                agt.ActionType = Log.LogActionType.Delete;
                this.AddLog(ci, agt);
               agt.Save("授課教師.課程", "刪除","", Log.LogTargetCategory.Course, ci.CourseID.ToString());
            }
             * */
            /* ====  Log  for inserted records =====*/
            K12.Data.CourseRecord course = K12.Data.Course.SelectByID(this.PrimaryKey);
            StringBuilder sb = new StringBuilder(string.Format("課程「{0}」,學年度「{1}」,學期「{2}」 \n", course.Name, course.SchoolYear, EMBACore.DataItems.SemesterItem.GetSemesterByCode(course.Semester + "").Name));
            sb.Append("授課教師更改為: \n");
            foreach (UDT.CourseInstructor ci in insertRecs)
            {
                string teacherName = this.dicTeachers[ci.TeacherID.ToString()].Name;
                string role = this.dicTags[ci.TagID.ToString()].TagFullName;
                sb.Append(string.Format("教師:{0} , 角色:{1} , 成績管理:{2} \n ", teacherName, role, ci.IsScored ? "是" : "否"));

                //Log.LogAgent agt = new Log.LogAgent();
                //agt.ActionType = Log.LogActionType.AddNew;
                //this.AddLog(ci, agt);
                //agt.Save("授課教師.課程", "新增", "", Log.LogTargetCategory.Course, ci.CourseID.ToString());
            }

            FISCA.LogAgent.ApplicationLog.Log("課程.資料項目.教授 / 助教 / 助理", "修改", "course", this.PrimaryKey, sb.ToString());
        }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:85,代码来源:Course_Instructor.cs


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