Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string method    = Utils.GetQueryStringValue("Method");
            int    MeetingID = Utils.GetInt(Request.QueryString["MeetingID"], -1);

            PageIndex = Utils.GetInt(Request.QueryString["Page"], 1);

            if (!IsPostBack && method == "")
            {
                if (CheckGrant(global::Common.Enum.TravelPermission.行政中心_会议记录_删除记录))
                {
                    DeleteFlag = true;
                }
                if (CheckGrant(global::Common.Enum.TravelPermission.行政中心_会议记录_修改记录))
                {
                    EditFlag = true;
                }
                string   MeetingNum       = Utils.GetQueryStringValue("MeetingNum");
                string   MeetingTheme     = Utils.GetQueryStringValue("MeetingTheme");
                DateTime?MeetingDateBegin = Utils.GetDateTimeNullable(Request.QueryString["MeetingDateBegin"]);
                DateTime?MeetingDateEnd   = Utils.GetDateTimeNullable(Request.QueryString["MeetingDateEnd"]);
                EyouSoft.BLL.AdminCenterStructure.MeetingInfo           bllMeetingInfo  = new EyouSoft.BLL.AdminCenterStructure.MeetingInfo();
                IList <EyouSoft.Model.AdminCenterStructure.MeetingInfo> listMeetingInfo = bllMeetingInfo.GetList(PageSize, PageIndex, ref RecordCount, CurrentUserCompanyID, MeetingNum, MeetingTheme, MeetingDateBegin, MeetingDateEnd);
                if (listMeetingInfo != null && listMeetingInfo.Count > 0)
                {
                    this.crptCahierList.DataSource = listMeetingInfo;
                    this.crptCahierList.DataBind();
                    this.BindPage();
                }
                else
                {
                    this.crptCahierList.EmptyText     = "<tr><td colspan=\"8\"><div style=\"text-align:center;  margin-top:75px; margin-bottom:75px;\">没有相关的数据!</span></div></td></tr>";
                    this.ExporPageInfoSelect1.Visible = false;
                }
            }

            if (method == "DeleteMeeting" && MeetingID != -1)//删除
            {
                EyouSoft.BLL.AdminCenterStructure.MeetingInfo bllMeetingInfo = new EyouSoft.BLL.AdminCenterStructure.MeetingInfo();
                if (bllMeetingInfo.Delete(CurrentUserCompanyID, MeetingID))
                {
                    Response.Clear();
                    Response.Write("True");
                    Response.End();
                }
                else
                {
                    Response.Clear();
                    Response.Write("False");
                    Response.End();
                }
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    MeetingID = Utils.GetInt(Request.QueryString["MeetingID"], -1);
            string Method    = Utils.GetFormValue("hidMethod");

            if (!IsPostBack && MeetingID != -1)
            {
                EyouSoft.BLL.AdminCenterStructure.MeetingInfo   bllMeetingInfo   = new EyouSoft.BLL.AdminCenterStructure.MeetingInfo();
                EyouSoft.Model.AdminCenterStructure.MeetingInfo modelMeetingInfo = bllMeetingInfo.GetModel(CurrentUserCompanyID, MeetingID);
                if (modelMeetingInfo != null)
                {
                    this.hidMeetingID.Value = modelMeetingInfo.Id.ToString();
                    MeetingNum       = modelMeetingInfo.MetttingNo;
                    MeetingSubject   = modelMeetingInfo.Title;
                    JoinPersonnel    = modelMeetingInfo.Personal;
                    MeetingTimeBegin = modelMeetingInfo.BeginDate;
                    MeetingTimeEnd   = modelMeetingInfo.EndDate;
                    MeetingLocale    = modelMeetingInfo.Location;
                    Remark           = modelMeetingInfo.Remark;
                }
            }
            if (Method == "save")
            {
                if (this.hidMeetingID.Value != "")
                {
                    if (!CheckGrant(global::Common.Enum.TravelPermission.行政中心_会议记录_修改记录))
                    {
                        Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.行政中心_会议记录_修改记录, true);
                    }
                }
                else
                {
                    if (!CheckGrant(global::Common.Enum.TravelPermission.行政中心_会议记录_新增记录))
                    {
                        Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.行政中心_会议记录_新增记录, true);
                    }
                }
                MeetingNum       = Utils.GetFormValue("txt_MeetingNum");
                MeetingSubject   = Utils.GetFormValue("txt_MeetingSubject");
                JoinPersonnel    = Utils.GetFormValue("txt_JoinPersonnel");
                MeetingTimeBegin = Utils.GetDateTime(Request.Form["txt_MeetingTimeBegin"], Utils.GetDateTime("1900-01-01"));
                MeetingTimeEnd   = Utils.GetDateTime(Request.Form["txt_MeetingTimeEnd"], Utils.GetDateTime("1900-01-01"));
                MeetingLocale    = Utils.GetFormValue("txt_MeetingLocale");
                Remark           = Utils.GetFormValue("txt_Remark");

                EyouSoft.BLL.AdminCenterStructure.MeetingInfo   bllMeetingInfo   = new EyouSoft.BLL.AdminCenterStructure.MeetingInfo();
                EyouSoft.Model.AdminCenterStructure.MeetingInfo modelMeetingInfo = new EyouSoft.Model.AdminCenterStructure.MeetingInfo();
                modelMeetingInfo.CompanyId  = CurrentUserCompanyID;
                modelMeetingInfo.MetttingNo = MeetingNum;
                modelMeetingInfo.Title      = MeetingSubject;
                modelMeetingInfo.Personal   = JoinPersonnel;
                modelMeetingInfo.BeginDate  = (MeetingTimeBegin);
                modelMeetingInfo.EndDate    = (MeetingTimeEnd);
                modelMeetingInfo.Location   = MeetingLocale;
                modelMeetingInfo.Remark     = Remark;
                modelMeetingInfo.IssueTime  = DateTime.Now;

                if (this.hidMeetingID.Value != "")            //修改
                {
                    modelMeetingInfo.Id = Utils.GetInt(this.hidMeetingID.Value);
                    if (bllMeetingInfo.Update(modelMeetingInfo))
                    {
                        MessageBox.ResponseScript(this, string.Format("alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide();window.parent.location='{2}';", "修改成功!", Utils.GetQueryStringValue("iframeId"), "/administrativeCenter/cahierManage/Default.aspx"));
                    }
                    else
                    {
                        MessageBox.Show(this.Page, "修改失败!");
                    }
                }
                else                           //新增
                {
                    if (bllMeetingInfo.Add(modelMeetingInfo))
                    {
                        MessageBox.ResponseScript(this, string.Format("alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide();window.parent.location='{2}';", "新增成功!", Utils.GetQueryStringValue("iframeId"), "/administrativeCenter/cahierManage/Default.aspx"));
                    }
                    else
                    {
                        MessageBox.Show(this.Page, "新增失败!");
                    }
                }
            }
        }