/// <summary> /// Install plugin /// </summary> public override void Install() { //var descriptor = _pluginFinder.GetPluginDescriptorBySystemName<IPlugin>("NopUI.Core"); if (!PublicInterface.IsInstall()) { //表示核心插件没有安装,不允许安装 throw new NopException("核心插件没有安装,不允许安装"); } //this.AddOrUpdatePluginLocaleResource("Account.UnitReturnRequests", "我的二手商品"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.Name", "商品名称"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.ShortDescription", "商品简述"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.FullDescription", "商品详述"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.MetaKeywords", "Meta关键词"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.MetaDescription", "Meta描述"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.MetaTitle", "Meta标题"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.Price", "价格"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.Published", "是否发布"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.Deleted", "是否删除"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.CreatedOnUtc", "发布时间"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.UpdatedOnUtc", "更新时间"); //this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.Unit.Fields.PictureId", "商品图片"); //this.AddOrUpdatePluginLocaleResource("Unit.list", "我的二手商品列表"); //database objects Unit.list _objectContext.Install(); base.Install(); }
protected void BtnSave_Click(object sender, EventArgs e) { if (ConferenceManage.SetApplyState(-1, this.RecordId)) { if (this.CBoxSMS.Checked) { DateTime sendTime = default(DateTime); sendTime = DateTime.Now; PublicInterface.SendSmsMsg(new SMSLog { SendUser = this.Session["yhdm"].ToString(), ReceiveUser = this.hdnMangeCode.Value.ToString(), Message = this.txtContent.Text, SendTime = sendTime, I_XGID = this.RecordId.ToString(), V_LXBM = "009" }); } if (this.CBRTX.Checked) { PublicInterface.SendSysMsg(this.getPTDBSJ(this.RecordId.ToString(), "会议退回:" + this.txtContent.Text, this.Session["yhdm"].ToString())); } this.JS.Text = "alert('会议室申请已处理!');window.returnValue='" + this.RecordId.ToString() + "';window.close();"; return; } this.JS.Text = "alert('处理会议室申请失败!');"; }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.tpcode = base.Request.QueryString["code"].ToString(); PublicInterface.PTDBSJDelete(this.tpcode, "024"); this.labTypeCode.Text = this.tpcode; this.bindPagedata(this.tpcode); this.lbllink.Text = this.FilesBind(18, this.tpcode); } }
protected void btnHasten_Click(object sender, EventArgs e) { SMSLog sMSData = this.GetSMSData(); int num = PublicInterface.SendSmsMsg(sMSData); if (num > 0) { this.Page.RegisterStartupScript("", "<script>alert('档案借阅催还信息发送成功!');</script>"); return; } this.Page.RegisterStartupScript("", "<script>alert('档案借阅催还信息发送失败!');</script>"); }
protected bool SendSms(string sendUser, string receiveUser, string message, DateTime sendTime, int recordId, string types) { return(PublicInterface.SendSmsMsg(new SMSLog { SendUser = sendUser, ReceiveUser = receiveUser, Message = message, SendTime = sendTime, V_LXBM = types, I_XGID = recordId.ToString() }) == 1); }
private void GetSms(string xgid, string Mes, string jsyhdm) { PublicInterface.SendSmsMsg(new SMSLog { SendUser = this.Session["yhdm"].ToString(), SendTime = System.DateTime.Now, ReceiveUser = jsyhdm, Message = Mes, V_LXBM = "015", I_XGID = xgid }); }
private void getPTDBSJ(string xgid, string Mes, string jsyhdm) { PublicInterface.SendSysMsg(new PTDBSJ { V_LXBM = "015", I_XGID = xgid, DTM_DBSJ = System.DateTime.Now, V_Content = Mes, V_DBLJ = "", V_YHDM = jsyhdm }); }
public TreeNode ToTree() { return(new TreeNode(Name, new[] { new TreeNode("Name", new[] { new TreeNode(Name) }), new TreeNode("BaseTypeName", new[] { new TreeNode(BaseTypeName) }), new TreeNode("Namespace", new[] { new TreeNode(Namespace) }), new TreeNode("AssemblyName", new[] { new TreeNode(AssemblyName) }), PublicInterface.ToTree(), ImplementedInterface.ToTree(), BaseType?.ToTree() ?? new TreeNode("Empty base type") })); }
protected void Page_Load(object sender, System.EventArgs e) { if (!base.IsPostBack) { this.tpcode = base.Request.QueryString["typecode"].ToString(); PublicInterface.PTDBSJDelete(this.tpcode, "024"); this.labTypeCode.Text = this.tpcode; this.bindPagedata(); this.FileLink1.MID = 18; this.FileLink1.FID = this.hdfPrjGuid.Value.ToString(); this.FileLink1.Type = 1; } }
private void getOrganiger(string xgid, string Mes, string jsyhdm) { PublicInterface.SendSysMsg(new PTDBSJ { V_LXBM = "026", I_XGID = xgid, DTM_DBSJ = DateTime.Now, V_Content = Mes, V_DBLJ = "StockManage/sendGoods/ViewSendNote.aspx?ic=" + xgid, V_YHDM = jsyhdm, V_TPLJ = "", C_OpenFlag = "1" }); }
private void getOrganiger(string xgid, string Mes, string jsyhdm) { PublicInterface.SendSysMsg(new PTDBSJ { V_LXBM = "024", I_XGID = xgid, DTM_DBSJ = DateTime.Now, V_Content = Mes, V_DBLJ = "Epc/ProjectLayout/ProjectInfo/InfoView.aspx?OpType=SEE&Code=" + xgid, V_YHDM = jsyhdm, V_TPLJ = "new_Mail.gif", C_OpenFlag = "1" }); }
private void getOrganiger(string xgid, string Mes, string jsyhdm) { PublicInterface.SendSysMsg(new PTDBSJ { V_LXBM = "024", I_XGID = xgid, DTM_DBSJ = System.DateTime.Now, V_Content = Mes, V_DBLJ = "EPC/Pm/PrjInfo/PrjInfoView.aspx?typecode=" + xgid, V_YHDM = jsyhdm, V_TPLJ = "new_Mail.gif", C_OpenFlag = "1" }); }
private void getOrganiger(string xgid, string Mes, string jsyhdm, DateTime Time) { PublicInterface.SendSysMsg(new PTDBSJ { V_LXBM = "023", I_XGID = xgid, DTM_DBSJ = Time, V_Content = Mes, V_DBLJ = "Epc/EquipmentManagement/Check/CheckView.aspx?Type=023&Guid=" + xgid, V_YHDM = jsyhdm, V_TPLJ = "new_Mail.gif", C_OpenFlag = "1" }); }
private void getOrganiger(string xgid, string Mes, string jsyhdm) { PublicInterface.SendSysMsg(new com.jwsoft.pm.entpm.model.PTDBSJ { V_LXBM = "017", I_XGID = xgid, DTM_DBSJ = System.DateTime.Now, V_Content = Mes, V_DBLJ = string.Concat(new string[] { "?rid=", xgid, "&bc=", this.BusinessCode, "&bcl=", this.BusinessClass }), V_YHDM = jsyhdm }); }
protected void Page_Load(object sender, EventArgs e) { string text = base.Request.QueryString["Guid"]; string lXBM = base.Request.QueryString["Type"]; PublicInterface.PTDBSJDelete(text, lXBM); EquipmentInfo singleEquipmentInfo = EquipmentAction.GetSingleEquipmentInfo(new Guid(text)); DataTable list = this.manage.GetList("ResourceTypeCode='" + singleEquipmentInfo.EquipmentType + "'"); if (list.Rows.Count > 0) { this.lblType.Text = list.Rows[0]["ResourceTypeName"].ToString(); } else { this.lblType.Text = ""; } this.lblcode.Text = singleEquipmentInfo.EquipmentManCode.ToString(); this.lblName.Text = singleEquipmentInfo.EquipmentName.ToString(); this.lblSp.Text = singleEquipmentInfo.Spec.ToString(); this.lbljingdu.Text = singleEquipmentInfo.ThePrecision.ToString(); this.lblmader.Text = singleEquipmentInfo.Manufacturer.ToString(); this.lblchuchang.Text = singleEquipmentInfo.FactoryCode.ToString(); this.lblDatechu.Text = singleEquipmentInfo.FactoryDate.ToShortDateString(); this.lblBugDate.Text = singleEquipmentInfo.PurchaseDate.ToShortDateString(); this.lblzhouqi.Text = singleEquipmentInfo.CheckCycle.ToString(); this.lblyear.Text = singleEquipmentInfo.ServiceYear.ToString(); this.lblMoney.Text = singleEquipmentInfo.OriginalPrice.ToString(); this.lblState.Text = singleEquipmentInfo.State.ToString(); this.lblRemark.Text = singleEquipmentInfo.Remark; this.lblzeju.Text = singleEquipmentInfo.depreciation.ToString(); this.lblProject.Text = this.BLL.projectName(singleEquipmentInfo.EquipmentUniqueCode.ToString()); try { this.lbldanwei.Text = com.jwsoft.pm.entpm.PageHelper.QueryCorp(this, int.Parse(singleEquipmentInfo.ContactDept)); } catch { } }
protected void btnApply_Click(object sender, EventArgs e) { int applyRecordId = 0; if (this.hdnRecordID.Value != "") { applyRecordId = Convert.ToInt32(this.hdnRecordID.Value); } DateTime sendTime = default(DateTime); sendTime = DateTime.Now; if (PublicInterface.SendSmsMsg(new SMSLog { SendUser = this.Session["yhdm"].ToString(), ReceiveUser = this.hdnMangeCode.Value.ToString(), Message = "会议室申请已提交,请及时安排!", SendTime = sendTime, I_XGID = applyRecordId.ToString(), V_LXBM = "010" }) == 1) { if (ConferenceManage.SetApplyState(1, applyRecordId)) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "alert('会议室申请已提交,系统将自动通知管理员!');;", true); } else { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "alert('会议室取消申请失败!');", true); } } else { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "alert('发送短信消息失败!');;", true); } this.GridView1.DataBind(); }
private void AddType(IHTMLDiv parent, CompilationType type, Action <string> UpdateLocation) { var div = new IHTMLDiv().AttachTo(parent); div.style.marginTop = "0.1em"; div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana; div.style.whiteSpace = ScriptCoreLib.JavaScript.DOM.IStyle.WhiteSpaceEnum.nowrap; var i = default(IHTMLImage); if (type.IsInterface) { i = new PublicInterface(); } else { i = new PublicClass(); } i.AttachTo(div); i.style.verticalAlign = "middle"; i.style.marginRight = "0.5em"; var s = new IHTMLAnchor { innerText = type.Name, title = "" + type.MetadataToken }.AttachTo(div); if (!string.IsNullOrEmpty(type.HTMLElement)) { var c = new IHTMLCode(); Action <string, JSColor> Write = (Text, Color) => { var cs = new IHTMLSpan { innerText = Text }; cs.style.color = Color; cs.AttachTo(c); }; Write("<", JSColor.Blue); Write(type.HTMLElement, JSColor.FromRGB(0xa0, 0, 0)); Write("/>", JSColor.Blue); //c.style.marginLeft = "1em"; c.style.Float = ScriptCoreLib.JavaScript.DOM.IStyle.FloatEnum.right; c.AttachTo(s); } s.href = "#"; s.style.textDecoration = "none"; s.style.color = JSColor.System.WindowText; Action onclick = delegate { }; s.onclick += e => { e.PreventDefault(); s.focus(); if (TouchTypeSelected != null) { TouchTypeSelected(type); } UpdateLocation(type.FullName + " - " + type.Summary + " - HTML:" + type.HTMLElement); onclick(); }; s.onfocus += delegate { s.style.backgroundColor = JSColor.System.Highlight; s.style.color = JSColor.System.HighlightText; }; s.onblur += delegate { s.style.backgroundColor = JSColor.None; s.style.color = JSColor.System.WindowText; }; onclick = delegate { var children = new IHTMLDiv().AttachTo(div); children.style.paddingLeft = "1em"; Func <IHTMLDiv> Group = () => new IHTMLDiv().AttachTo(children); var Groups = new { Nested = Group(), Constructors = Group(), Methods = Group(), Events = Group(), Fields = Group(), Properties = Group(), }; type.GetNestedTypes().ForEach( (Current, Next) => { AddType(Groups.Nested, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); type.GetConstructors().ForEach( (Current, Next) => { AddTypeConstructor(Groups.Constructors, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); var HiddenMethods = new List <int>(); Action <CompilationMethod> AddIfAny = SourceMethod => { if (SourceMethod == null) { return; } HiddenMethods.Add(SourceMethod.MetadataToken); }; Action AfterEvents = delegate { type.GetMethods().ForEach( (Current, Next) => { if (!HiddenMethods.Contains(Current.MetadataToken)) { AddTypeMethod(Groups.Methods, Current, UpdateLocation); } ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); }; Action AfterProperties = delegate { type.GetEvents().ForEach( (Current, Next) => { AddIfAny(Current.GetAddMethod()); AddIfAny(Current.GetRemoveMethod()); AddTypeEvent(Groups.Events, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } )(AfterEvents); }; type.GetProperties().ForEach( (Current, Next) => { AddIfAny(Current.GetSetMethod()); AddIfAny(Current.GetGetMethod()); AddTypeProperty(Groups.Properties, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } )(AfterProperties); type.GetFields().ForEach( (Current, Next) => { AddTypeField(Groups.Fields, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); var NextClickHide = default(Action); var NextClickShow = default(Action); NextClickHide = delegate { children.Hide(); onclick = NextClickShow; }; NextClickShow = delegate { children.Show(); onclick = NextClickHide; }; onclick = NextClickHide; }; }
private void AddType(IHTMLDiv parent, CompilationType type, Action<string> UpdateLocation) { var div = new IHTMLDiv().AttachTo(parent); div.style.marginTop = "0.1em"; div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana; div.style.whiteSpace = ScriptCoreLib.JavaScript.DOM.IStyle.WhiteSpaceEnum.nowrap; var i = default(IHTMLImage); if (type.IsInterface) { i = new PublicInterface(); } else { i = new PublicClass(); } i.AttachTo(div); i.style.verticalAlign = "middle"; i.style.marginRight = "0.5em"; var s = new IHTMLAnchor { innerText = type.Name, title = "" + type.MetadataToken }.AttachTo(div); if (!string.IsNullOrEmpty(type.HTMLElement)) { var c = new IHTMLCode(); Action<string, JSColor> Write = (Text, Color) => { var cs = new IHTMLSpan { innerText = Text }; cs.style.color = Color; cs.AttachTo(c); }; Write("<", JSColor.Blue); Write(type.HTMLElement, JSColor.FromRGB(0xa0, 0, 0)); Write("/>", JSColor.Blue); //c.style.marginLeft = "1em"; c.style.Float = ScriptCoreLib.JavaScript.DOM.IStyle.FloatEnum.right; c.AttachTo(s); } s.href = "#"; s.style.textDecoration = "none"; s.style.color = JSColor.System.WindowText; Action onclick = delegate { }; s.onclick += e => { e.PreventDefault(); s.focus(); if (TouchTypeSelected != null) TouchTypeSelected(type); UpdateLocation(type.FullName + " - " + type.Summary + " - HTML:" + type.HTMLElement); onclick(); }; s.onfocus += delegate { s.style.backgroundColor = JSColor.System.Highlight; s.style.color = JSColor.System.HighlightText; }; s.onblur += delegate { s.style.backgroundColor = JSColor.None; s.style.color = JSColor.System.WindowText; }; onclick = delegate { var children = new IHTMLDiv().AttachTo(div); children.style.paddingLeft = "1em"; Func<IHTMLDiv> Group = () => new IHTMLDiv().AttachTo(children); var Groups = new { Nested = Group(), Constructors = Group(), Methods = Group(), Events = Group(), Fields = Group(), Properties = Group(), }; type.GetNestedTypes().ForEach( (Current, Next) => { AddType(Groups.Nested, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); type.GetConstructors().ForEach( (Current, Next) => { AddTypeConstructor(Groups.Constructors, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); var HiddenMethods = new List<int>(); Action<CompilationMethod> AddIfAny = SourceMethod => { if (SourceMethod == null) return; HiddenMethods.Add(SourceMethod.MetadataToken); }; Action AfterEvents = delegate { type.GetMethods().ForEach( (Current, Next) => { if (!HiddenMethods.Contains(Current.MetadataToken)) { AddTypeMethod(Groups.Methods, Current, UpdateLocation); } ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); }; Action AfterProperties = delegate { type.GetEvents().ForEach( (Current, Next) => { AddIfAny(Current.GetAddMethod()); AddIfAny(Current.GetRemoveMethod()); AddTypeEvent(Groups.Events, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } )(AfterEvents); }; type.GetProperties().ForEach( (Current, Next) => { AddIfAny(Current.GetSetMethod()); AddIfAny(Current.GetGetMethod()); AddTypeProperty(Groups.Properties, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } )(AfterProperties); type.GetFields().ForEach( (Current, Next) => { AddTypeField(Groups.Fields, Current, UpdateLocation); ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay( 50, Next ); } ); var NextClickHide = default(Action); var NextClickShow = default(Action); NextClickHide = delegate { children.Hide(); onclick = NextClickShow; }; NextClickShow = delegate { children.Show(); onclick = NextClickHide; }; onclick = NextClickHide; }; }