protected void Page_Load(object sender, EventArgs e) { this.SageCRMEntryItem.EvalCode = "eWare.Mode =1;"; this.SageCRMEntryItem.EvalCode += "Group = eWare.GetBlock(\"entrygroup\");"; this.SageCRMEntryItem.EvalCode += "PersonSearch = eWare.GetBlock(\"entry\");"; this.SageCRMEntryItem.EvalCode += "PersonSearch.FieldName = \"SearchPerson\";"; this.SageCRMEntryItem.EvalCode += "PersonSearch.EntryType = 56;"; this.SageCRMEntryItem.EvalCode += "PersonSearch.LookupFamily = \"Person\";"; this.SageCRMEntryItem.EvalCode += "Group.AddEntry(PersonSearch);"; this.SageCRMEntryItem.EvalCode += "Group.DisplayForm=false;"; this.SageCRMEntryItem.EvalCode += "Response.Write(Group.Execute());"; // Response.Write(Request.Form.ToString()); if (Request.Form["SearchPerson"] != null) { this.Comp_CompanyId = Request.Form["SearchPerson"].ToString(); } if (this.Comp_CompanyId != "") { SageCRMDataSource1.TableName = "Person"; SageCRMDataSource1.WhereClause = getWhereClause(); SageCRMDataSource1.Parameters.Add("pers_xxxxxxxxxId", getEntityIDFieldValue()); SageCRMDataSource1.UpdateRecord(); Response.Redirect(SageCRMTabGroup.CRMURL("entwiz/PeopleList.aspx").ToString() + "&" + getEntityIDField() + "=" + getEntityIDFieldValue()); } }
protected void Page_Load(object sender, EventArgs e) { this.Title = "Panoply Technologies"; Master.setMenuIndex(2); Master.requiresAuthentication = true; if (!this.securityLayer()) { return; } string compid = SageCRMPortalEntryBlock.GetVisitorInfo("comp_companyid"); string persid = SageCRMPortalEntryBlock.GetVisitorInfo("pers_personid"); SageCRMPortalEntryBlock.EntityWhere = "comp_companyid=" + compid; lbl_companyinfo.Text = "Below is your company information that we contain on our databse.<br />" + "<br />Please verify the information to help us ensure that it is up to date." + "<br />Only the primary contact in your company can edit this data." + ""; SageCRMDataSource1.TableName = "Company"; SageCRMDataSource1.WhereClause = "comp_companyid=" + compid; IDataReader idr = SageCRMDataSource1.SelectData(); //only the primaru person can edit the company information idr.Read(); string ppersid = idr["comp_primarypersonid"] as string; if (ppersid != persid) { Button1.Visible = false; } else { Button1.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString.Get("nrid") != null) { //update the record just created with the project id SageCRMDataSource1.TableName = "projecttasks"; SageCRMDataSource1.Parameters.Add("task_crmprojectid", Session["proj_projectid"]); SageCRMDataSource1.WhereClause = "task_projecttasksid=" + Request.QueryString.Get("nrid").ToString(); SageCRMDataSource1.UpdateRecord(); } this.SageCRMListBlock.EntityWhere = "task_crmprojectid=" + Session["proj_projectid"]; }
protected void Page_Load(object sender, EventArgs e) { string ExtraKeys = ""; if ((false) || (false)) { //set key values on url so they will be picked up in webpicker SageCRMDataSource1.TableName = "xxxxxxxxx"; SageCRMDataSource1.WhereClause = getWhereClause(); IDataReader idr = SageCRMDataSource1.SelectData(); //get our IDataReader class //loop through our class while (idr.Read()) { if ((false) && (idr["xxxx_CompanyId"] != null)) { ExtraKeys = ExtraKeys + "&Key1=" + idr["xxxx_CompanyId"].ToString(); } if ((false) && (idr["xxxx_PersonId"] != null)) { ExtraKeys = ExtraKeys + "&Key2=" + idr["xxxx_PersonId"].ToString(); } } } string link = this.SageCRMTabGroup.CRMURL("343").ToString(); string iKey_CustomEntity = "58"; string prevurl = Request.ServerVariables["URL"].ToString() + "?" + Request.QueryString.ToString(); link += ExtraKeys + "&Key-1=" + iKey_CustomEntity + "&E=xxxxxxxxx"; link += "&Key58=" + getEntityIDFieldValue(); link += "&" + getEntityIDField() + "=" + getEntityIDFieldValue(); prevurl = prevurl.Replace("&", "%26"); this.SageCRMButton.Url = "link:" + HttpUtility.UrlEncode(link + "&PrevCustomURL=" + prevurl); this.SageCRMListBlock.EntityWhere = getWhereClause(); this.SageCRMTopContent.EntityWhere = getEntityIDField() + "=" + getEntityIDFieldValue(); this.SageCRMListBlock.EvalCode += "block.PrevUrl=eWare.Url(\"xxxxxxxxx/Library.aspx\");"; }
protected void Page_Load(object sender, EventArgs e) { string ExtraKeys = ""; if ((false) || (false) || (false) || (false) || (false) || (false) || (false)) { //set key values on url so they will be picked up in webpicker SageCRMDataSource1.TableName = "xxxxxxxxx"; SageCRMDataSource1.WhereClause = getWhereClause(); IDataReader idr = SageCRMDataSource1.SelectData(); //get our IDataReader class //loop through our class while (idr.Read()) { if ((false) && (idr["xxxx_CompanyId"] != null)) { ExtraKeys = ExtraKeys + "&Key1=" + idr["xxxx_CompanyId"].ToString(); } if ((false) && (idr["xxxx_PersonId"] != null)) { ExtraKeys = ExtraKeys + "&Key2=" + idr["xxxx_PersonId"].ToString(); } if ((false) && (idr["xxxx_OpportunityId"] != null)) { ExtraKeys = ExtraKeys + "&Key7=" + idr["xxxx_OpportunityId"].ToString(); } else if ((false) && (idr["xxxx_CaseId"] != null)) { ExtraKeys = ExtraKeys + "&Key8=" + idr["xxxx_CaseId"].ToString(); } else if ((false) && (idr["xxxx_AccountId"] != null)) { ExtraKeys = ExtraKeys + "&Key24=" + idr["xxxx_AccountId"].ToString(); } if ((false) && (idr["xxxx_OrderId"] != null)) { ExtraKeys = ExtraKeys + "&Key24=" + idr["xxxx_OrderId"].ToString(); } if ((false) && (idr["xxxx_QuoteId"] != null)) { ExtraKeys = ExtraKeys + "&Key24=" + idr["xxxx_QuoteId"].ToString(); } } } string task = this.SageCRMTabGroup.CRMURL("361").ToString(); string appt = this.SageCRMTabGroup.CRMURL("362").ToString(); string iKey_CustomEntity = "58"; string prevurl = Request.ServerVariables["URL"].ToString() + "?" + Request.QueryString.ToString(); task += "&Key58=" + getEntityIDFieldValue(); task += "&" + getEntityIDField() + "=" + getEntityIDFieldValue(); task += ExtraKeys + "&Key-1=" + iKey_CustomEntity + "&E=xxxxxxxxx"; appt += "&Key58=" + getEntityIDFieldValue(); appt += "&" + getEntityIDField() + "=" + getEntityIDFieldValue(); appt += ExtraKeys + "&Key-1=" + iKey_CustomEntity + "&E=xxxxxxxxx"; prevurl = prevurl.Replace("&", "%26"); this.SageCRMButtonTask.Url = "link:" + HttpUtility.UrlEncode(task + "&PrevCustomURL=" + prevurl); this.SageCRMButtonAppt.Url = "link:" + HttpUtility.UrlEncode(appt + "&PrevCustomURL=" + prevurl); this.SageCRMListBlock.EntityWhere = getWhereClause(); this.SageCRMTopContent.EntityWhere = getEntityIDField() + "=" + getEntityIDFieldValue(); }