private void FillRepTask(string sqlstring, string sqlstring2) { RepTask.DataSource = DatabaseConnection.CreateDataset(sqlstring); RepTask.DataBind(); if (RepTask.Items.Count == 0) { RepeaterInfo.Text = Root.rm.GetString("CRMTodtxt6"); RepeaterInfo.Visible = true; RepTask.Visible = false; } RepTask2.DataSource = DatabaseConnection.CreateDataset(sqlstring2); RepTask2.DataBind(); if (RepTask2.Items.Count == 0) { RepeaterInfo2.Text = Root.rm.GetString("CRMTodtxt6"); RepeaterInfo2.Visible = true; RepTask2.Visible = false; } Session["TaskFromFind"] = 1; }
private void FillRepTask() { RepTask.DataSource = DatabaseConnection.CreateDataset("SELECT * FROM CRM_TODOLIST_VIEW WHERE (EXPIRATIONDATE>='" + UC.LTZ.ToUniversalTime(DateTime.Now).ToString(@"yyyyMMdd") + "' OR (EXPIRATIONDATE<'" + UC.LTZ.ToUniversalTime(DateTime.Now).ToString(@"yyyyMMdd") + "' AND FLAGEXECUTED=0)) AND OWNERID=" + UC.UserId + " ORDER BY EXPIRATIONDATE ASC;"); RepTask.DataBind(); if (RepTask.Items.Count == 0) { RepeaterInfo.Text = Root.rm.GetString("CRMTodtxt6"); RepeaterInfo.Visible = true; RepTask.Visible = false; } RepTask2.DataSource = DatabaseConnection.CreateDataset("SELECT * FROM CRM_TODOLIST_VIEW WHERE (EXPIRATIONDATE>='" + UC.LTZ.ToUniversalTime(DateTime.Now).ToString(@"yyyyMMdd") + "' OR (Expirationdate<'" + UC.LTZ.ToUniversalTime(DateTime.Now).ToString(@"yyyyMMdd") + "' AND FLAGEXECUTED=0)) AND (CREATEDBYID=" + UC.UserId + " AND OWNERID<>" + UC.UserId + ") ORDER BY EXPIRATIONDATE ASC;"); RepTask2.DataBind(); if (RepTask2.Items.Count == 0) { RepeaterInfo2.Text = Root.rm.GetString("CRMTodtxt6"); RepeaterInfo2.Visible = true; RepTask2.Visible = false; } Session["TaskFromFind"] = null; }