예제 #1
0
        protected void btnEdit_Click(object sender, System.EventArgs e)
        {
            string RowGuid        = Request["RowGuid"];
            string DWGuid         = Request["DWGuid"];
            string strSql         = "SELECT top(1) EnterpriseName FROM RG_OUInfo WHERE dwGuid='" + DWGuid + "' order by row_ID desc";
            string EnterpriseName = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);

            //先获取投资经理
            strSql = "SELECT s_xiangmujl_guid,s_xiangmujl FROM VIEW_CurrentVersion WHERE dwGuid='" + DWGuid + "'";
            DataView dvUser = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);

            if (dvUser.Count == 0)
            {
                WriteAjaxMessage("该企业没有对应的项目,请联系系统管理员。");
                return;
            }
            if (Request["sType"] == "0")
            {
                //说明是通过新增后提交审核,那么提交审核时就不要再新增一个版本了
                UpdateUserName_2019.Text = this.DisplayName;
                UpdateUserGuid_2019.Text = this.UserGuid;
                Status_2019.Text         = EpointRegisterUser_Bizlogic.OUStatus.待审核;
                UpdateTime_2019.Text     = DateTime.Now.ToString();
                IsHistory_2019.Text      = "0";
                oEditPage.SaveTableValues(Request["RowGuid"], tdContainer);
            }
            else
            {
                //先将原来的设置为历史记录
                Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(oEditPage.TableDetail.SQL_TableName, Request["RowGuid"]);
                oRow["IsHistory"] = "1";
                //oRow["UpdateUserName"] = this.DisplayName;
                //oRow["UpdateUserGuid"] = this.UserGuid;
                //oRow["UpdateTime"] = DateTime.Now;
                oRow.Update();

                //再新增一个即可
                UpdateUserName_2019.Text = this.DisplayName;
                UpdateUserGuid_2019.Text = this.UserGuid;
                IsHistory_2019.Text      = "0";
                UpdateTime_2019.Text     = DateTime.Now.ToString();
                Status_2019.Text         = EpointRegisterUser_Bizlogic.OUStatus.待审核;// "1";//0:编辑   1:待审核   2:通过
                //DelFlag_2019.Text = "0";
                RowGuid = Guid.NewGuid().ToString();
                oAddPage.SaveTableValues(RowGuid, tdContainer, Request.QueryString["ParentRowGuid"]);
            }
            #region 保存附件


            CL_YYZZ.MisRowGuid  = DWGuid;
            CL_YYZZ.MisTableID  = TableID;
            CL_YYZZ.ProjectGuid = "";
            CL_YYZZ.Comment     = DWGuid;
            CL_YYZZ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_YYZZ.Save();

            CL_SWDJZ.MisRowGuid  = DWGuid;
            CL_SWDJZ.MisTableID  = TableID;
            CL_SWDJZ.ProjectGuid = "";
            CL_SWDJZ.Comment     = DWGuid;
            CL_SWDJZ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_SWDJZ.Save();

            CL_ZZJGDM.MisRowGuid  = DWGuid;
            CL_ZZJGDM.MisTableID  = TableID;
            CL_ZZJGDM.ProjectGuid = "";
            CL_ZZJGDM.Comment     = DWGuid;
            CL_ZZJGDM.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_ZZJGDM.Save();

            CL_SWPZZ.MisRowGuid  = DWGuid;
            CL_SWPZZ.MisTableID  = TableID;
            CL_SWPZZ.ProjectGuid = "";
            CL_SWPZZ.Comment     = DWGuid;
            CL_SWPZZ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_SWPZZ.Save();

            CL_QTFJ.MisRowGuid  = DWGuid;
            CL_QTFJ.MisTableID  = TableID;
            CL_QTFJ.ProjectGuid = "";
            CL_QTFJ.Comment     = DWGuid;
            CL_QTFJ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_QTFJ.Save();
            #endregion

            #region 通知投资经理

            for (int m = 0; m < dvUser.Count; m++)
            {
                msg.WaitHandle_Insert(
                    Guid.NewGuid().ToString(),
                    "【审核】" + EnterpriseName + "动态信息",
                    "",
                    dvUser[m]["s_xiangmujl_guid"].ToString(),
                    dvUser[m]["s_xiangmujl"].ToString(),
                    Session["UserGuid"].ToString(),
                    Session["DisplayName"].ToString(),
                    "",
                    "EpointRegisterUser/Pages_RG/RG_DongTai/RG_DongTai_DetailForCheck.aspx?RowGuid=" + RowGuid + "&DWGuid=" + DWGuid,
                    "",
                    "",
                    1,
                    "",
                    "",
                    ""
                    );
            }

            #endregion

            //oEditPage.SaveTableValues(Request["RowGuid"], tdContainer);
            this.WriteAjaxMessage("alert('提交成功');");
            RefreshGrid();

            btnEdit.Visible = false;
        }
예제 #2
0
        protected void btnAdd_Click(object sender, System.EventArgs e)
        {
            string RowGuid = Request["RowGuid"];
            string DWGuid  = Request["DWGuid"];

            UpdateUserName_2019.Text = this.DisplayName;
            UpdateUserGuid_2019.Text = this.UserGuid;
            IsHistory_2019.Text      = "0";
            UpdateTime_2019.Text     = DateTime.Now.ToString();
            Status_2019.Text         = EpointRegisterUser_Bizlogic.OUStatus.编辑中;//0:编辑   1:待审核   2:通过
            DWGuid_2019.Text         = DWGuid;
            oAddPage.SaveTableValues(RowGuid, tdContainer, Request.QueryString["ParentRowGuid"]);

            #region 保存附件
            CL_ZLJS.MisRowGuid  = DWGuid;
            CL_ZLJS.MisTableID  = TableID;
            CL_ZLJS.ProjectGuid = "";
            CL_ZLJS.Comment     = DWGuid;
            CL_ZLJS.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_ZLJS.Save();

            CL_YYZZ.MisRowGuid  = DWGuid;
            CL_YYZZ.MisTableID  = TableID;
            CL_YYZZ.ProjectGuid = "";
            CL_YYZZ.Comment     = DWGuid;
            CL_YYZZ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_YYZZ.Save();

            CL_SWDJZ.MisRowGuid  = DWGuid;
            CL_SWDJZ.MisTableID  = TableID;
            CL_SWDJZ.ProjectGuid = "";
            CL_SWDJZ.Comment     = DWGuid;
            CL_SWDJZ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_SWDJZ.Save();

            CL_ZZJGDM.MisRowGuid  = DWGuid;
            CL_ZZJGDM.MisTableID  = TableID;
            CL_ZZJGDM.ProjectGuid = "";
            CL_ZZJGDM.Comment     = DWGuid;
            CL_ZZJGDM.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_ZZJGDM.Save();

            CL_SWPZZ.MisRowGuid  = DWGuid;
            CL_SWPZZ.MisTableID  = TableID;
            CL_SWPZZ.ProjectGuid = "";
            CL_SWPZZ.Comment     = DWGuid;
            CL_SWPZZ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_SWPZZ.Save();

            CL_QTFJ.MisRowGuid  = DWGuid;
            CL_QTFJ.MisTableID  = TableID;
            CL_QTFJ.ProjectGuid = "";
            CL_QTFJ.Comment     = DWGuid;
            CL_QTFJ.d_TiJiaoSJ  = DateTime.Now.ToString();
            CL_QTFJ.Save();
            #endregion

            ////如果是父表,要转入多表编辑页面
            //if (oAddPage.TableDetail.TableType == 1)
            //{
            //    Response.Redirect("MultiPageTab.aspx?mode=Mode&TableID=" + oAddPage.TableDetail.TableID + "&RowGuid=" + RowGuid);
            //}
            //else
            //{
            //    this.WriteAjaxMessage ("refreshParent();");
            //}
            //Epoint.MisBizLogic2.Web.CodeGenerator.InitiateControl_AddPage(oAddPage, tdContainer);
            //this.WriteAjaxMessage("EP_ShowMessageDiv(" + tdContainer.ClientID + ",'数据保存成功')");
            string url = "RG_DongTai_Edit.aspx?RowGuid=" + RowGuid + "&DWGuid=" + DWGuid + "&sType=0";
            this.WriteAjaxMessage("refreshParent();alert('添加成功');window.location.href='" + url + "';");
        }