protected void Page_Load(object sender, EventArgs e) { #region 功能执行. if (this.DoType == "DeleteFJ") { FrmAttachment ath1 = new FrmAttachment(); ath1.MyPK = this.FK_MapData + "_" + this.Ath + "_" + this.FK_Node; ath1.Delete(); this.WinClose(); return; } if (this.DoType == "DeleteDtl") { MapDtl dtl = new MapDtl(); dtl.No = this.FK_MapDtl + "_" + this.FK_Node; dtl.Delete(); this.WinClose(); return; } #endregion 功能执行. MapData md = new MapData(this.FK_MapData); FrmField sln = new FrmField(); sln.CheckPhysicsTable(); switch (this.DoType) { case "Dtl": //附件方案. this.Title = "从表权限"; BindDtl(); break; case "FJ": //附件方案. this.Title = "表单附件权限"; BindFJ(); break; case "Field": //字段方案. this.Title = "表单字段权限"; this.BindSln(); break; case "Copy": //字段方案. this.Title = "从其它节点复制权限"; this.BindCopy(); break; case "DoCopy": //字段方案. this.Title = "执行复制权限方案"; this.DoCopy(); break; default: this.Title = "没有涉及到的类型:" + this.DoType; break; } }
void btn_Click(object sender, EventArgs e) { FrmAttachment ath = new FrmAttachment(); Button btn = sender as Button; if (btn.ID == "Btn_Delete") { ath.MyPK = this.FK_MapData + "_" + this.Ath; ath.Delete(); this.WinClose("删除成功."); return; } ath.MyPK = this.FK_MapData + "_" + this.Ath; if (this.Ath != null) { ath.RetrieveFromDBSources(); } ath = this.Pub1.Copy(ath) as FrmAttachment; ath.FK_MapData = this.FK_MapData; ath.MyPK = this.FK_MapData + "_" + this.Ath; GroupFields gfs1 = new GroupFields(this.FK_MapData); if (gfs1.Count == 1) { GroupField gf = (GroupField)gfs1[0]; ath.GroupID = gf.OID; } else { ath.GroupID = this.Pub1.GetDDLByID("DDL_GroupField").SelectedItemIntVal; } if (this.Ath == null) { ath.UploadType = (AttachmentUploadType)int.Parse(this.UploadType); ath.MyPK = this.FK_MapData + "_" + this.Ath; if (ath.IsExits == true) { this.Alert("附件编号(" + ath.NoOfObj + ")已经存在。"); return; } ath.Insert(); } else { ath.NoOfObj = this.Ath; ath.Update(); } this.WinCloseWithMsg("保存成功"); }
void btn_Click(object sender, EventArgs e) { FrmAttachment ath = new FrmAttachment(); if (this.FK_Node == 0) { ath.MyPK = this.FK_MapData + "_" + this.Ath; } else { ath.MyPK = this.FK_MapData + "_" + this.Ath + "_" + this.FK_Node; } ath.RetrieveFromDBSources(); Button btn = sender as Button; if (btn.ID == "Btn_Delete") { //ath.MyPK = this.FK_MapData + "_" + this.Ath; ath.Delete(); this.WinClose("删除成功."); return; } ath.MyPK = this.FK_MapData + "_" + this.Ath; if (this.Ath != null) { ath.RetrieveFromDBSources(); } ath = this.Pub1.Copy(ath) as FrmAttachment; ath.FK_MapData = this.FK_MapData; ath.FK_Node = this.FK_Node; if (string.IsNullOrEmpty(this.Ath) == false) { ath.NoOfObj = this.Ath; } if (this.FK_Node == 0) { ath.MyPK = this.FK_MapData + "_" + ath.NoOfObj; } else { ath.MyPK = this.FK_MapData + "_" + ath.NoOfObj + "_" + this.FK_Node; } GroupFields gfs1 = new GroupFields(this.FK_MapData); if (gfs1.Count == 1) { GroupField gf = (GroupField)gfs1[0]; ath.GroupID = gf.OID; } else { ath.GroupID = this.Pub1.GetDDLByID("DDL_GroupField").SelectedItemIntVal; } //对流程的特殊判断. 20160513 加载页面时添加了判断,此处没有添加,导致保存报错。 zqp if (ath.IsNodeSheet == true) { ath.HisCtrlWay = (AthCtrlWay)this.Pub1.GetDDLByID("DDL_CtrlWay").SelectedItemIntVal; ath.AthUploadWay = (AthUploadWay)this.Pub1.GetDDLByID("DDL_AthUploadWay").SelectedItemIntVal; ath.FileShowWay = (FileShowWay)this.Pub1.GetDDLByID("DDL_FileShowWay").SelectedItemIntVal; //文件展现方式. ath.UploadCtrl = this.Pub1.GetDDLByID("DDL_UploadCtrl").SelectedItemIntVal; //使用的附件上传工具. ath.SaveWay = this.Pub1.GetDDLByID("DDL_" + FrmAttachmentAttr.SaveWay).SelectedItemIntVal; //保存方式. ath.IsHeLiuHuiZong = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsHeLiuHuiZong).Checked; //是否是合流节点汇总. ath.IsToHeLiuHZ = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsToHeLiuHZ).Checked; //是否汇总到合流节点.. } //word附件相关. ath.IsWoEnableWF = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableWF).Checked; ath.IsWoEnableSave = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableSave).Checked; ath.IsWoEnableReadonly = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableReadonly).Checked; ath.IsWoEnableRevise = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableRevise).Checked; ath.IsWoEnableViewKeepMark = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableViewKeepMark).Checked; ath.IsWoEnablePrint = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnablePrint).Checked; ath.IsWoEnableSeal = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableSeal).Checked; ath.IsWoEnableOver = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableOver).Checked; ath.IsWoEnableTemplete = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableTemplete).Checked; ath.IsWoEnableCheck = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableCheck).Checked; ath.IsWoEnableInsertFengXian = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableInsertFengXian).Checked; ath.IsWoEnableInsertFlow = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableInsertFlow).Checked; ath.IsWoEnableMarks = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableMarks).Checked; ath.IsWoEnableDown = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsWoEnableDown).Checked; ath.IsVisable = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsVisable).Checked; //是否可见. ath.FastKeyIsEnable = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.FastKeyIsEnable).Checked; ath.FastKeyGenerRole = this.Pub1.GetTBByID("TB_" + FrmAttachmentAttr.FastKeyGenerRole).Text; ath.IsOrder = this.Pub1.GetCBByID("CB_" + FrmAttachmentAttr.IsOrder).Checked; if (ath.FastKeyIsEnable == true) { if (ath.FastKeyGenerRole.Contains("*OID") == false) { throw new Exception("@快捷键生成规则必须包含*OID,否则会导致文件名重复."); } } if (this.Ath == null) { ath.UploadType = (AttachmentUploadType)int.Parse(this.UploadType); if (this.FK_Node == 0) { ath.MyPK = this.FK_MapData + "_" + ath.NoOfObj; } else { ath.MyPK = this.FK_MapData + "_" + ath.NoOfObj + "_" + this.FK_Node; } if (ath.IsExits == true) { this.Alert("附件编号(" + ath.NoOfObj + ")已经存在。"); return; } ath.Insert(); } else { ath.NoOfObj = this.Ath; if (this.FK_Node == 0) { ath.MyPK = this.FK_MapData + "_" + this.Ath; } else { ath.MyPK = this.FK_MapData + "_" + this.Ath + "_" + this.FK_Node; } ath.Update(); } this.WinCloseWithMsg("保存成功"); }