public void UpdateMaintenance()
 {
     SQLHelper.ExecuteSP(ConnectionString, "UpdateMaintenance", ID, CustodianID, MaintainedBy, MaintainanceDate, Problem, ServiceCost, SpareCost, Remark, LastModifiedBy, LastModifiedDate);
 }
 public void CancelMaintenance(Guid ID, Guid LastModifiedBy, DateTime LastModifiedDate)
 {
     SQLHelper.ExecuteSP(ConnectionString, "CancelMaintenance", ID, LastModifiedBy, LastModifiedDate);
 }
예제 #3
0
 public void ApproveRM()
 {
     SQLHelper.ExecuteSP(ConnectionString, "UpdateSIVApprove", ID, ApprovedDate, Status, ApprovedStatus);
 }
 public void InsertMaintenance()
 {
     SQLHelper.ExecuteSP(ConnectionString, "AddMaintenance", FixedAssetID, CustodianID, MaintainedBy, MaintainanceDate, Problem, ServiceCost, SpareCost, Status, Remark, CreatedBy, CreatedDate);
 }
 public DataTable GetFixedAssetIssueVouchers()
 {
     return(SQLHelper.getDataTable(ConnectionString, "GetFixedAssetIssueVoucher"));
 }
예제 #6
0
 public DataTable getunapprovedsivs(Guid UserID)
 {
     return(SQLHelper.getDataTable(ConnectionString, "GetUnapprovedSIVs", UserID));
 }
예제 #7
0
 public void UpdateStoreIssueVoucher()
 {
     ResolveName();
     SQLHelper.ExecuteSP(ConnectionString, "UpdateStoreIssueVoucher", ID, WorkUnitID, ItemID, RequestedQuantity, IssuedQuantity, UnitPrice, Remark, IssuedBy, IssuedDate, IssuedTo, ApprovedBy, ApprovedDate, LastModifiedBy, LastModifiedDate);
 }
예제 #8
0
        /// <summary>
        /// 生成安全资料计划总表 方法
        /// </summary>
        /// <param name="project"></param>
        /// <param name="safetyDataEnd"></param>
        public static void GetSafetyDataPlanMethod(Model.Base_Project project, List <Model.SafetyData_SafetyData> safetyDataEnd, DateTime?startTime, DateTime?endTime)
        {
            ////第一步 判断是否存在此项目的计划表
            ////第二步 不存在增加这个项目时间范围内的 存在取不存在时间段
            ////第三步 项目时间 是否为空? 现在默认都不能为空
            Model.SUBHSSEDB db         = Funs.DB;
            string          projectId  = project.ProjectId;
            DateTime        startDatep = project.StartDate.HasValue ? project.StartDate.Value : System.DateTime.Now;

            if (startTime.HasValue)
            {
                startDatep = startTime.Value;
            }
            DateTime startDate = startDatep;
            DateTime endDate   = project.EndDate.HasValue ? project.EndDate.Value : System.DateTime.Now.AddMonths(6);

            if (endTime.HasValue)
            {
                endDate = endTime.Value;
            }
            DeleteSafetyDataPlanByProjectDateId(projectId, endDate);   ///删除竣工后的考核计划
            foreach (var item in safetyDataEnd)
            {
                var safetyDataPlan = db.SafetyData_SafetyDataPlan.FirstOrDefault(x => x.ProjectId == project.ProjectId && x.SafetyDataId == item.SafetyDataId && (x.IsManual == null || x.IsManual == false));
                if (safetyDataPlan != null)
                {
                    ///取结束时间 最大值作为开始时间
                    DateTime maxEndDate = Funs.DB.SafetyData_SafetyDataPlan.Where(x => x.ProjectId == projectId && x.RealEndDate.HasValue && x.SafetyDataId == item.SafetyDataId).Select(x => x.RealEndDate.Value).Max();
                    if (endDate > maxEndDate) ////如果计划单最大时间小于项目结束时间 则追加时间 否则删去
                    {
                        startDate = maxEndDate;
                    }
                    else
                    { ///项目提前结束 则删除计划时间
                        var delSafetyDataPlan = from x in db.SafetyData_SafetyDataPlan where x.RealEndDate > endDate && x.SafetyDataId == item.SafetyDataId select x;
                        if (delSafetyDataPlan.Count() > 0)
                        {
                            db.SafetyData_SafetyDataPlan.DeleteAllOnSubmit(delSafetyDataPlan);
                        }
                    }
                }
                ////算出 开始、结束时间跨度 然后循环增加一个月 并把在此时间段的 考核项写入计划表
                for (int i = 0; startDate.AddMonths(i) <= endDate; i++)
                {
                    Model.SafetyData_SafetyDataPlan newSafetyDataPlan = new Model.SafetyData_SafetyDataPlan
                    {
                        SafetyDataPlanId = SQLHelper.GetNewID(typeof(Model.SafetyData_SafetyDataPlan)),
                        ProjectId        = projectId,
                        SafetyDataId     = item.SafetyDataId,
                        Score            = item.Score,
                        ShouldScore      = item.Score,
                        Remark           = item.Remark,
                    };

                    int monthValue = 0;  ///设置月数
                    if (item.CheckTypeValue1.HasValue)
                    {
                        monthValue = item.CheckTypeValue1.Value;
                    }

                    int dateValue = 1;  ///设置天
                    if (item.CheckTypeValue2.HasValue)
                    {
                        dateValue = item.CheckTypeValue2.Value;
                        if (dateValue > 30)
                        {
                            dateValue = 30;
                        }
                    }

                    ////TODO:通过判断是月报、季报、定时报等情况 是否落在 当前时间范围内 写入到计划总表
                    if (item.CheckType == BLL.Const.SafetyDataCheckType_1) /// 月报
                    {
                        if (startDate.AddMonths(i + monthValue).Month == 2 && dateValue > 28)
                        {
                            dateValue = 28;
                        }
                        DateTime?checkDate = Funs.GetNewDateTime(startDate.AddMonths(i + monthValue).Year + "-" + startDate.AddMonths(i + monthValue).Month + "-" + dateValue);
                        if (checkDate.HasValue && checkDate <= endDate && checkDate >= startDatep)
                        {
                            newSafetyDataPlan.CheckDate     = checkDate;
                            newSafetyDataPlan.RealStartDate = checkDate.Value.AddMonths(-1); ///月报开始日期
                            newSafetyDataPlan.RealStartDate = new DateTime(newSafetyDataPlan.RealStartDate.Value.Year, newSafetyDataPlan.RealStartDate.Value.Month, 1);
                            newSafetyDataPlan.RealEndDate   = newSafetyDataPlan.RealStartDate.Value.AddMonths(1).AddDays(-1);
                        }
                    }
                    else if (item.CheckType == BLL.Const.SafetyDataCheckType_2)                                                                                               /// 季报
                    {
                        int month = startDate.AddMonths(i).Month;                                                                                                             ///当前月份
                        if ((month == 3 + monthValue) || (month == 6 + monthValue) || (month == 9 + monthValue) || (month == monthValue) || (month == 12 && monthValue == 0)) ///考核季度时间
                        {
                            if (startDate.AddMonths(i + monthValue).Month == 2 && dateValue > 28)
                            {
                                dateValue = 28;
                            }
                            DateTime?checkDate = Funs.GetNewDateTime(startDate.AddMonths(i).Year + "-" + startDate.AddMonths(i).Month + "-" + dateValue);
                            if ((month == monthValue) && monthValue != 0)
                            {
                                checkDate = checkDate.Value.AddYears(1);
                            }

                            if (checkDate.HasValue && checkDate <= endDate && checkDate >= startDatep)
                            {
                                newSafetyDataPlan.CheckDate     = checkDate;
                                newSafetyDataPlan.RealStartDate = checkDate.Value.AddMonths(-3); ///开始日期
                                newSafetyDataPlan.RealStartDate = new DateTime(newSafetyDataPlan.RealStartDate.Value.Year, newSafetyDataPlan.RealStartDate.Value.Month, 1);
                                newSafetyDataPlan.RealEndDate   = newSafetyDataPlan.RealStartDate.Value.AddMonths(3).AddDays(-1);
                            }
                        }
                    }
                    else if (item.CheckType == BLL.Const.SafetyDataCheckType_3) /// 定时
                    {
                        if (startDate.AddMonths(i).Month == monthValue)         ///定时月份
                        {
                            if (startDate.AddMonths(i + monthValue).Month == 2 && dateValue > 28)
                            {
                                dateValue = 28;
                            }
                            DateTime?checkDate = Funs.GetNewDateTime(startDate.AddMonths(i).Year + "-" + startDate.AddMonths(i).Month + "-" + dateValue);
                            if (checkDate.HasValue && checkDate <= endDate && checkDate >= startDatep)
                            {
                                newSafetyDataPlan.CheckDate     = checkDate;
                                newSafetyDataPlan.RealStartDate = checkDate.Value.AddMonths(-12); ///开始日期
                                newSafetyDataPlan.RealStartDate = new DateTime(newSafetyDataPlan.RealStartDate.Value.Year, newSafetyDataPlan.RealStartDate.Value.Month, 1);
                                newSafetyDataPlan.RealEndDate   = checkDate.Value;
                            }
                        }
                    }
                    else if (item.CheckType == BLL.Const.SafetyDataCheckType_4) /// 开工后报
                    {
                        DateTime?checkDate = startDate.AddMonths(i);
                        if (checkDate.HasValue && checkDate <= endDate && BLL.Funs.CompareMonths(startDatep, checkDate.Value) == monthValue && checkDate >= startDatep)
                        {
                            newSafetyDataPlan.CheckDate     = checkDate;
                            newSafetyDataPlan.RealStartDate = startDate; ///开始日期
                            newSafetyDataPlan.RealEndDate   = checkDate.Value;
                        }
                    }
                    else if (item.CheckType == BLL.Const.SafetyDataCheckType_5) /// 半年报
                    {
                        if (startDate.AddMonths(i).Month == monthValue || startDate.AddMonths(i).Month == monthValue + 6)
                        {
                            if (startDate.AddMonths(i + monthValue).Month == 2 && dateValue > 28)
                            {
                                dateValue = 28;
                            }
                            DateTime?checkDate = Funs.GetNewDateTime(startDate.AddMonths(i).Year + "-" + startDate.AddMonths(i).Month + "-" + dateValue);
                            if (checkDate.HasValue && checkDate <= endDate && checkDate >= startDatep)
                            {
                                newSafetyDataPlan.CheckDate     = checkDate;
                                newSafetyDataPlan.RealStartDate = checkDate.Value.AddMonths(-6); ///开始日期
                                newSafetyDataPlan.RealStartDate = new DateTime(newSafetyDataPlan.RealStartDate.Value.Year, newSafetyDataPlan.RealStartDate.Value.Month, 1);
                                newSafetyDataPlan.RealEndDate   = newSafetyDataPlan.RealStartDate.Value.AddMonths(6).AddDays(-1);
                            }
                        }
                    }
                    else  /// 其他
                    {
                        if (monthValue > 0 && startDate.AddMonths(i).Year == System.DateTime.Now.Year && startDate.AddMonths(i).Month == monthValue)
                        {
                            if (startDate.AddMonths(i + monthValue).Month == 2 && dateValue > 28)
                            {
                                dateValue = 28;
                            }
                            DateTime?checkDate = Funs.GetNewDateTime(startDate.AddMonths(i).Year + "-" + startDate.AddMonths(i).Month + "-" + dateValue);
                            if (checkDate.HasValue && checkDate <= endDate && checkDate >= startDatep)
                            {
                                newSafetyDataPlan.CheckDate     = checkDate;
                                newSafetyDataPlan.RealStartDate = startDate; ///开始日期
                                newSafetyDataPlan.RealStartDate = new DateTime(newSafetyDataPlan.RealStartDate.Value.Year, newSafetyDataPlan.RealStartDate.Value.Month, 1);
                                newSafetyDataPlan.RealEndDate   = checkDate.Value;
                            }
                        }
                    }
                    if (newSafetyDataPlan.RealEndDate.HasValue)
                    {
                        newSafetyDataPlan.ReminderDate = newSafetyDataPlan.CheckDate.Value.AddDays(-7);
                        AddSafetyDataPlan(newSafetyDataPlan);
                    }
                }
            }
        }
 public DataTable GetBINCardList(Guid ItemID)
 {
     return(SQLHelper.getDataTable(ConnectionString, "GetBINCards", ItemID));
 }
 public DataRow GetBINCard(Guid ID)
 {
     return(SQLHelper.getDataRow(ConnectionString, "GetBINCardByID", ID));
 }
 public void UpdateBINCard()
 {
     SQLHelper.ExecuteSP(ConnectionString, "UpdateBINCard", ID, ItemID, BeginingQuantity, MinOrderQuantity, CurrentQuantity, Location, ShelfNo, RankNo, Remark, Status, LastModifiedBy, LastModifiedDate);
 }
 public void InsertBINCard()
 {
     SQLHelper.ExecuteSP(ConnectionString, "AddBINCard", ItemID, BeginingQuantity, MinOrderQuantity, CurrentQuantity, Location, ShelfNo, RankNo, Remark, Status, CreatedBy, CreatedDate);
 }
예제 #13
0
        /// <summary>
        /// 保存Meeting
        /// </summary>
        /// <param name="meeting">会议信息</param>
        /// <returns></returns>
        public static void SaveMeeting(Model.MeetingItem meeting)
        {
            Model.SUBHSSEDB db     = Funs.DB;
            string          menuId = string.Empty;

            if (meeting.MeetingType == "C")
            {
                Model.Meeting_ClassMeeting newClassMeeting = new Model.Meeting_ClassMeeting
                {
                    ClassMeetingId       = meeting.MeetingId,
                    ProjectId            = meeting.ProjectId,
                    UnitId               = meeting.UnitId == "" ? null : meeting.UnitId,
                    TeamGroupId          = meeting.TeamGroupId == "" ? null : meeting.TeamGroupId,
                    ClassMeetingCode     = meeting.MeetingCode,
                    ClassMeetingName     = meeting.MeetingName,
                    ClassMeetingDate     = Funs.GetNewDateTime(meeting.MeetingDate),
                    ClassMeetingContents = meeting.MeetingContents,
                    CompileMan           = meeting.CompileManId,
                    MeetingPlace         = meeting.MeetingPlace,
                    MeetingHours         = meeting.MeetingHours,
                    MeetingHostMan       = meeting.MeetingHostMan,
                    AttentPerson         = meeting.AttentPerson,
                    AttentPersonNum      = meeting.AttentPersonNum,
                    States               = Const.State_2,
                };

                if (meeting.States != "1")
                {
                    newClassMeeting.States = Const.State_0;
                }

                var updateMeet = Funs.DB.Meeting_ClassMeeting.FirstOrDefault(x => x.ClassMeetingId == meeting.MeetingId);
                if (updateMeet == null)
                {
                    newClassMeeting.CompileDate      = DateTime.Now;
                    meeting.MeetingId                = newClassMeeting.ClassMeetingId = SQLHelper.GetNewID();
                    newClassMeeting.ClassMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectClassMeetingMenuId, newClassMeeting.ProjectId, null);
                    ClassMeetingService.AddClassMeeting(newClassMeeting);
                }
                else
                {
                    ClassMeetingService.UpdateClassMeeting(newClassMeeting);
                }
                if (meeting.States == "1")
                {
                    CommonService.btnSaveData(meeting.ProjectId, Const.ProjectClassMeetingMenuId, newClassMeeting.ClassMeetingId, newClassMeeting.CompileMan, true, newClassMeeting.ClassMeetingName, "../Meeting/ClassMeetingView.aspx?ClassMeetingId={0}");
                }

                menuId = Const.ProjectClassMeetingMenuId;
            }
            else if (meeting.MeetingType == "W")
            {
                Model.Meeting_WeekMeeting newWeekMeeting = new Model.Meeting_WeekMeeting
                {
                    WeekMeetingId       = meeting.MeetingId,
                    ProjectId           = meeting.ProjectId,
                    UnitId              = meeting.UnitId == "" ? null : meeting.UnitId,
                    WeekMeetingCode     = meeting.MeetingCode,
                    WeekMeetingName     = meeting.MeetingName,
                    WeekMeetingDate     = Funs.GetNewDateTime(meeting.MeetingDate),
                    WeekMeetingContents = meeting.MeetingContents,
                    CompileMan          = meeting.CompileManId,
                    CompileDate         = Funs.GetNewDateTime(meeting.CompileDate),
                    MeetingPlace        = meeting.MeetingPlace,
                    MeetingHours        = meeting.MeetingHours,
                    MeetingHostMan      = meeting.MeetingHostMan,
                    AttentPerson        = meeting.AttentPerson,
                    AttentPersonNum     = meeting.AttentPersonNum,
                    States              = Const.State_2,

                    AttentPersonIds = meeting.AttentPersonIds,
                };

                if (meeting.States != "1")
                {
                    newWeekMeeting.States = Const.State_0;
                }
                if (!string.IsNullOrEmpty(meeting.MeetingHostManId))
                {
                    newWeekMeeting.MeetingHostManId = meeting.MeetingHostManId;
                }

                var updateMeet = Funs.DB.Meeting_WeekMeeting.FirstOrDefault(x => x.WeekMeetingId == meeting.MeetingId);
                if (updateMeet == null)
                {
                    newWeekMeeting.CompileDate     = DateTime.Now;
                    meeting.MeetingId              = newWeekMeeting.WeekMeetingId = SQLHelper.GetNewID();
                    newWeekMeeting.WeekMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectWeekMeetingMenuId, newWeekMeeting.ProjectId, null);
                    WeekMeetingService.AddWeekMeeting(newWeekMeeting);
                }
                else
                {
                    WeekMeetingService.UpdateWeekMeeting(newWeekMeeting);
                }
                if (meeting.States == "1")
                {
                    CommonService.btnSaveData(meeting.ProjectId, Const.ProjectWeekMeetingMenuId, newWeekMeeting.WeekMeetingId, newWeekMeeting.CompileMan, true, newWeekMeeting.WeekMeetingName, "../Meeting/WeekMeetingView.aspx?WeekMeetingId={0}");
                }
                menuId = Const.ProjectWeekMeetingMenuId;
            }
            else if (meeting.MeetingType == "M")
            {
                Model.Meeting_MonthMeeting newMonthMeeting = new Model.Meeting_MonthMeeting
                {
                    MonthMeetingId       = meeting.MeetingId,
                    ProjectId            = meeting.ProjectId,
                    UnitId               = meeting.UnitId == "" ? null : meeting.UnitId,
                    MonthMeetingCode     = meeting.MeetingCode,
                    MonthMeetingName     = meeting.MeetingName,
                    MonthMeetingDate     = Funs.GetNewDateTime(meeting.MeetingDate),
                    MonthMeetingContents = meeting.MeetingContents,
                    CompileMan           = meeting.CompileManId,
                    CompileDate          = Funs.GetNewDateTime(meeting.CompileDate),
                    MeetingPlace         = meeting.MeetingPlace,
                    MeetingHours         = meeting.MeetingHours,
                    MeetingHostMan       = meeting.MeetingHostMan,
                    AttentPerson         = meeting.AttentPerson,
                    AttentPersonNum      = meeting.AttentPersonNum,
                    States               = Const.State_2,
                    AttentPersonIds      = meeting.AttentPersonIds,
                };

                if (meeting.States != "1")
                {
                    newMonthMeeting.States = Const.State_0;
                }
                if (!string.IsNullOrEmpty(meeting.MeetingHostManId))
                {
                    newMonthMeeting.MeetingHostManId = meeting.MeetingHostManId;
                }

                var updateMeet = Funs.DB.Meeting_MonthMeeting.FirstOrDefault(x => x.MonthMeetingId == meeting.MeetingId);
                if (updateMeet == null)
                {
                    newMonthMeeting.CompileDate      = DateTime.Now;
                    meeting.MeetingId                = newMonthMeeting.MonthMeetingId = SQLHelper.GetNewID();
                    newMonthMeeting.MonthMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectMonthMeetingMenuId, newMonthMeeting.ProjectId, null);
                    MonthMeetingService.AddMonthMeeting(newMonthMeeting);
                }
                else
                {
                    MonthMeetingService.UpdateMonthMeeting(newMonthMeeting);
                }
                if (meeting.States == "1")
                {
                    CommonService.btnSaveData(meeting.ProjectId, Const.ProjectMonthMeetingMenuId, newMonthMeeting.MonthMeetingId, newMonthMeeting.CompileMan, true, newMonthMeeting.MonthMeetingName, "../Meeting/MonthMeetingView.aspx?MonthMeetingId={0}");
                }
                menuId = Const.ProjectMonthMeetingMenuId;
            }
            else if (meeting.MeetingType == "S")
            {
                Model.Meeting_SpecialMeeting newSpecialMeeting = new Model.Meeting_SpecialMeeting
                {
                    SpecialMeetingId       = meeting.MeetingId,
                    ProjectId              = meeting.ProjectId,
                    UnitId                 = meeting.UnitId == "" ? null : meeting.UnitId,
                    SpecialMeetingCode     = meeting.MeetingCode,
                    SpecialMeetingName     = meeting.MeetingName,
                    SpecialMeetingDate     = Funs.GetNewDateTime(meeting.MeetingDate),
                    SpecialMeetingContents = meeting.MeetingContents,
                    CompileMan             = meeting.CompileManId,
                    CompileDate            = Funs.GetNewDateTime(meeting.CompileDate),
                    MeetingPlace           = meeting.MeetingPlace,
                    MeetingHours           = meeting.MeetingHours,
                    MeetingHostMan         = meeting.MeetingHostMan,
                    AttentPerson           = meeting.AttentPerson,
                    AttentPersonNum        = meeting.AttentPersonNum,
                    States                 = Const.State_2,
                    //MeetingHostManId = meeting.MeetingHostManId,
                    AttentPersonIds = meeting.AttentPersonIds,
                };

                if (meeting.States != "1")
                {
                    newSpecialMeeting.States = Const.State_0;
                }
                if (!string.IsNullOrEmpty(meeting.MeetingHostManId))
                {
                    newSpecialMeeting.MeetingHostManId = meeting.MeetingHostManId;
                }

                var updateMeet = Funs.DB.Meeting_SpecialMeeting.FirstOrDefault(x => x.SpecialMeetingId == meeting.MeetingId);
                if (updateMeet == null)
                {
                    newSpecialMeeting.CompileDate        = DateTime.Now;
                    meeting.MeetingId                    = newSpecialMeeting.SpecialMeetingId = SQLHelper.GetNewID();
                    newSpecialMeeting.SpecialMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectSpecialMeetingMenuId, newSpecialMeeting.ProjectId, null);
                    SpecialMeetingService.AddSpecialMeeting(newSpecialMeeting);
                }
                else
                {
                    SpecialMeetingService.UpdateSpecialMeeting(newSpecialMeeting);
                }
                if (meeting.States == "1")
                {
                    CommonService.btnSaveData(meeting.ProjectId, Const.ProjectSpecialMeetingMenuId, newSpecialMeeting.SpecialMeetingId, newSpecialMeeting.CompileMan, true, newSpecialMeeting.SpecialMeetingName, "../Meeting/SpecialMeetingView.aspx?SpecialMeetingId={0}");
                }
                menuId = Const.ProjectSpecialMeetingMenuId;
            }
            else
            {
                Model.Meeting_AttendMeeting newAttendMeeting = new Model.Meeting_AttendMeeting
                {
                    AttendMeetingId       = meeting.MeetingId,
                    ProjectId             = meeting.ProjectId,
                    UnitId                = meeting.UnitId == "" ? null : meeting.UnitId,
                    AttendMeetingCode     = meeting.MeetingCode,
                    AttendMeetingName     = meeting.MeetingName,
                    AttendMeetingDate     = Funs.GetNewDateTime(meeting.MeetingDate),
                    AttendMeetingContents = meeting.MeetingContents,
                    CompileMan            = meeting.CompileManId,
                    CompileDate           = Funs.GetNewDateTime(meeting.CompileDate),
                    MeetingPlace          = meeting.MeetingPlace,
                    MeetingHours          = meeting.MeetingHours,
                    MeetingHostMan        = meeting.MeetingHostMan,
                    AttentPerson          = meeting.AttentPerson,
                    AttentPersonNum       = meeting.AttentPersonNum,
                    States                = Const.State_2,
                    //MeetingHostManId = meeting.MeetingHostManId,
                    AttentPersonIds = meeting.AttentPersonIds,
                };

                if (meeting.States != "1")
                {
                    newAttendMeeting.States = Const.State_0;
                }
                if (!string.IsNullOrEmpty(meeting.MeetingHostManId))
                {
                    newAttendMeeting.MeetingHostManId = meeting.MeetingHostManId;
                }

                var updateMeet = Funs.DB.Meeting_AttendMeeting.FirstOrDefault(x => x.AttendMeetingId == meeting.MeetingId);
                if (updateMeet == null)
                {
                    newAttendMeeting.CompileDate       = DateTime.Now;
                    meeting.MeetingId                  = newAttendMeeting.AttendMeetingId = SQLHelper.GetNewID();
                    newAttendMeeting.AttendMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectAttendMeetingMenuId, newAttendMeeting.ProjectId, null);
                    AttendMeetingService.AddAttendMeeting(newAttendMeeting);
                }
                else
                {
                    AttendMeetingService.UpdateAttendMeeting(newAttendMeeting);
                }
                if (meeting.States == "1")
                {
                    CommonService.btnSaveData(meeting.ProjectId, Const.ProjectAttendMeetingMenuId, newAttendMeeting.AttendMeetingId, newAttendMeeting.CompileMan, true, newAttendMeeting.AttendMeetingName, "../Meeting/AttendMeetingView.aspx?AttendMeetingId={0}");
                }
                menuId = Const.ProjectAttendMeetingMenuId;
            }
            if (!string.IsNullOrEmpty(menuId) && !string.IsNullOrEmpty(meeting.MeetingId))
            {
                SaveMeetUrl(meeting.MeetingId, menuId, meeting.AttachUrl, meeting.AttachUrl1, meeting.AttachUrl2);
            }
        }
 public DataTable GetMaintenanceList(string TagNo, DateTime MaintainanceDate, DateTime MaintainanceDate2)
 {
     return(SQLHelper.getDataTable(ConnectionString, "GetMaintenances", TagNo, MaintainanceDate, MaintainanceDate2));
 }
예제 #15
0
 public void CancelStoreIssueVoucher(Guid ID, Guid LastModifiedBy, DateTime LastModifiedDate)
 {
     SQLHelper.ExecuteSP(ConnectionString, "CancelStoreIssueVoucher", ID, LastModifiedBy, LastModifiedDate);
 }
 public DataRow GetMaintenance(Guid ID)
 {
     return(SQLHelper.getDataRow(ConnectionString, "GetMaintenanceByID", ID));
 }
예제 #17
0
 public DataRow GetStoreIssueVoucherBySRID(Guid SRID)
 {
     return(SQLHelper.getDataRow(ConnectionString, "GetStoreIssueVoucherBySRID", SRID));
 }
예제 #18
0
 public DataTable GetFARNListbyUser(Guid UserID)
 {
     return(SQLHelper.getDataTable(ConnectionString, "GetFARNByReceiverID", UserID));
 }
 public DataRow GetFixedAssetIssueVoucherByFARNID(Guid FARNID)
 {
     return(SQLHelper.getDataRow(ConnectionString, "GetFixedAssetIssueVoucherByFARNID", FARNID));
 }