Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Login())
            {
                SomeJS.Text = "<script>opener.location.href=opener.location.href;self.close();</script>";
            }
            else
            {
                string js;
                string control = Request.QueryString["textbox"].ToString();
                if (Request.QueryString["Activity"] != null)
                {
                    activityId = Request.QueryString["Activity"].ToString();
                }
                string control2 = Request.QueryString["textboxID"].ToString();
                js          = "<script>";
                js         += "function SetRef(id,tx){";
                js         += "	dynaret('" + control + "').value=tx;";
                js         += "	dynaret('" + control2 + "').value=id;";
                js         += "	self.close();";
                js         += "	parent.HideBox();}";
                js         += "</script>";
                SomeJS.Text = js;
                Find.Text   = Root.rm.GetString("Prftxt5");

                if (!Page.IsPostBack)
                {
                    SetFocus(FindIt);
                }

                if (!StaticFunctions.IsBlank(Request.QueryString["company"]))
                {
                    RepActivity.DataSource = DatabaseConnection.CreateDataset("SELECT ID,SUBJECT FROM CRM_WORKACTIVITY WHERE ID<>" + int.Parse(activityId) + " AND (COMPANYID=" + int.Parse(Request.QueryString["company"].ToString()) + ") ORDER BY ACTIVITYDATE DESC");
                    RepActivity.DataBind();
                }

                if (!StaticFunctions.IsBlank(Request.QueryString["contact"]))
                {
                    RepActivity.DataSource = DatabaseConnection.CreateDataset("SELECT ID,SUBJECT FROM CRM_WORKACTIVITY WHERE ID<>" + int.Parse(activityId) + " AND (REFERRERID=" + int.Parse(Request.QueryString["contact"]).ToString() + ") ORDER BY ACTIVITYDATE DESC");
                    RepActivity.DataBind();
                }
            }
        }
Exemple #2
0
 public void Find_Click(object sender, EventArgs e)
 {
     RepActivity.DataSource = DatabaseConnection.CreateDataset("SELECT ID,SUBJECT FROM CRM_WORKACTIVITY WHERE ID<>" + int.Parse(activityId) + " AND (SUBJECT LIKE '%" + DatabaseConnection.FilterInjection(FindIt.Text) + "%') ORDER BY ACTIVITYDATE DESC");
     RepActivity.DataBind();
 }