コード例 #1
0
ファイル: MessageHistory.ascx.cs プロジェクト: alex765022/IBN
        protected void btnSubmit_Click(object sender, System.EventArgs e)
        {
            int userGroup = 1;

            // Alex Fix
            if (IsAdmin)
            {
                userGroup = int.Parse(lstGroup1.SelectedItem.Value);
            }
            else if (IsPartner /*Security.IsUserInGroup(InternalSecureGroups.Partner)*/)
            {
                userGroup = UserReport.GetGroupForPartnerUser(iCurUserId);
            }
            DataTable dt = UserReport.SearchHistory(
                /*DateTime.Parse(txtDateFrom.Text)*/ dtcStartDate.SelectedDate,
                /*DateTime.Parse(txtDateTo.Text).AddDays(1)*/ dtcEndDate.SelectedDate.AddDays(1).AddSeconds(-1),
                IsAdmin?int.Parse(lstUser.Value):iCurUserId,
                userGroup,
                int.Parse(lstContact.Value),
                int.Parse(lstGroup2.SelectedItem.Value),
                int.Parse(lstInOut.Value),
                txtKeyword.Text,
                chkOrder.Checked);

            MessRep.DataSource = dt.DefaultView;
            MessRep.DataBind();
            //reader.Close();
        }
コード例 #2
0
ファイル: ChatHistory.ascx.cs プロジェクト: alex765022/IBN
        protected void btnSubmit_Click(object sender, System.EventArgs e)
        {
            IDataReader reader = UserReport.SearchChat(
                IsAdmin?0:iCurUserId,
                lstChats.Value != "" ? int.Parse(lstChats.Value):0,
                dtcStartDate.SelectedDate,
                dtcEndDate.SelectedDate.AddDays(1).AddSeconds(-1),
                txtKeyword.Text,
                chkOrder.Checked?1:0);

            MessRep.DataSource = reader;
            MessRep.DataBind();
        }
コード例 #3
0
 private void BindData()
 {
     MessRep.DataSource = Mediachase.IBN.Business.Common.GetBroadCastMessages(false);
     MessRep.DataBind();
     if (MessRep.Items.Count == 0)
     {
         MessRep.Visible    = false;
         lblNoItems.Visible = true;
         lblNoItems.Text    = LocRM.GetString("tNoItems");
     }
     else
     {
         MessRep.Visible    = true;
         lblNoItems.Visible = false;
     }
 }
コード例 #4
0
ファイル: AlertsHistory.ascx.cs プロジェクト: alex765022/IBN
        protected void btnSubmit_Click(object sender, System.EventArgs e)
        {
            //DateTime dtFrom = txtDateFrom.Text != "" ? DateTime.Parse(txtDateFrom.Text): DateTime.MinValue;
            DateTime dtFrom = DateTime.MinValue;

            //if(dtcStartDate.Date.Text != "") dtFrom = dtcStartDate.Value;
            dtFrom = dtcStartDate.SelectedDate;
            //DateTime dtTo = txtDateTo.Text != "" ? DateTime.Parse(txtDateTo.Text): DateTime.MinValue;
            DateTime dtTo = DateTime.MinValue;

            dtTo = dtcEndDate.SelectedDate;
            DataView dv = UserReport.GetAlertsHistory(IsAdmin ? int.Parse(lstUser.Value) : iCurUserId, dtFrom, dtTo.AddDays(1).AddSeconds(-1), chkOrder.Checked);

            MessRep.DataSource = dv;
            MessRep.DataBind();
            //reader.Close();
        }