Exemplo n.º 1
0
        /// <summary>
        /// 从邮件中获取新的更新信息
        /// </summary>
        protected void GetEmailUpdateInfo()
        {
            //获取邮件配置信息
            FrameConfig FC = new FrameConfig();
            string ConfigStr = FC.GetDetail("HostMail").ConfigValue;
            FrameCommon FComm = new FrameCommon();
            string UserName = FComm.FindValueFromStr(ConfigStr, "UserName=").Trim();
            string Password = FComm.FindValueFromStr(ConfigStr, "Password=").Trim();
            string Pop3Host = FComm.FindValueFromStr(ConfigStr, "POP3Host=").Trim();
            int Pop3Port = Convert.ToInt32(FComm.FindValueFromStr(ConfigStr, "POP3Port=").Trim());
            bool IsSSL = FComm.FindValueFromStr(ConfigStr, "EnableSsl=").Trim() == "1" ? true : false;
            //连接邮件服务器
            using (POP3_Client MyClient = new POP3_Client())
            {
                MyClient.Connect(Pop3Host, Pop3Port, IsSSL);
                MyClient.Authenticate(UserName, Password, false);
                string SystemGuid = FComm.GetSystemGuid();
                for (int i = 0; i < MyClient.Messages.Count; i++)
                {
                    POP3_ClientMessage mail = MyClient.Messages[i];
                    Mime m = Mime.Parse(mail.MessageToByte());
                    if (m.Attachments.Length > 0 && m.MainEntity.Subject.ToLower().IndexOf(SystemGuid.ToLower()) > -1) //如果有附件,且为该系统的标识
                    {
                        string UpdateSubject = m.MainEntity.Subject;
                        DateTime UpdateTime = m.MainEntity.Date;
                        string UpdateContent = m.BodyText;
                        int FileCount = m.Attachments.Length;
                        string UpdateGuid = System.Guid.NewGuid().ToString();
                        string FilePath = "/UpdateBackUp/" + UpdateTime.ToString("yyyyMMdd") + "-" + new System.Random().Next(1000, 9999).ToString() + "/"; //生成路径
                        string FilenameList = "";
                        //将基本信息存入数据库

                        foreach (MimeEntity entry in m.Attachments)
                        {

                            string fileName = entry.ContentDisposition_FileName; //获取文件名称
                            if (fileName != null && fileName.Trim() != "")  //有些文件取不到,如txt
                            {
                                FilenameList = FilenameList + fileName + ";";
                                string DirPath = Server.MapPath(FilePath);
                                System.IO.Directory.CreateDirectory(DirPath);
                                string FileURL = DirPath + fileName;
                                FileInfo fi = new FileInfo(FileURL);
                                byte[] data = entry.Data;
                                FileStream pFileStream = null;
                                pFileStream = new FileStream(FileURL, FileMode.Create);
                                pFileStream.Write(data, 0, data.Length);
                                pFileStream.Close();
                            }
                        }
                        mail.MarkForDeletion();
                        new FrameUpdate().InsertUpdate(UpdateGuid, UpdateTime, UpdateSubject, UpdateContent, FileCount, FilenameList, FilePath);
                    }

                }
                MyClient.Disconnect();
            }

            this.Refresh();
        }
        protected void Refresh()
        {
            int TotalNum = 0;
            string AssetsGuid = "";
            if (Request.QueryString["TypeGuid"] == null && Request.QueryString["AssetsGuid"] == null)
                AssetsGuid = "";
            else if (Request.QueryString["TypeGuid"] != null)
                AssetsGuid = Request.QueryString["TypeGuid"].ToString();
            else
            {
                AssetsGuid = Request.QueryString["AssetsGuid"].ToString();
                ViewState["AssetsGuid"] = AssetsGuid;
                ViewState["AssetsName"] = Request.QueryString["AssetsName"].ToString();

            }

            DataView dv = AM.SelectStockIn(AssetsGuid, dftInDate.FromText, dftInDate.ToText, Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            //���÷�ҳ��Ϣ
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);
            FC.SetPagerInfo(AspNetPager1, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);
            //����һ��js����������ǿ��ִ��datagrid����ɫ�任���粻�ã���updatapanel�����ݸ��º��޷�����datagridcolor.js��ִ��
            CallJsFun("ChangeColor();");
        }
Exemplo n.º 3
0
 /// <summary>
 /// 获取分页信息
 /// </summary>
 protected void Refresh()
 {
     int TotalNum = 0;
     DataView dv = CL.SelectList(txtTitle.Text, txtKeyWords.Text, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");
     CallJsFun("ChangeColor();");
 }
Exemplo n.º 4
0
 protected void Refresh()
 {
     int TotalNum = 0;
     DataView dv = ITO.SelectOrgRec(Session["ORGID"].ToString(), DateFromTo1.FromText.Trim(), DateFromTo1.ToText.Trim(), txtTitle.Text.Trim(), Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
     FC.SetPagerInfo(AspNetPager1, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
     CallJsFun("ChangeColor();");
 }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.CurrentPosition = "ͼƬѡ��";
     string dir=Request.QueryString["Dir"].ToString();
     if (dir.Trim() == "") return;
     DataView dvIcon = new FrameCommon().ListImgFilesFromDir(dir);
     //��Ϣ
     IconList.DataSource = dvIcon;
     IconList.DataKeyField = "fileName";
     IconList.DataBind();// �ڴ˴������û������Գ�ʼ��ҳ��
 }
        private void refresh()
        {
            int TotalNum = 0;
            string AgentGuid = Session["ORGID"].ToString();
            GridView1.DataSource = new CawInfoAgentShipInfo().Select(this.txtShipName.Text, AgentGuid, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        private void refresh()
        {
            int TotalNum = 0;

            GridView1.DataSource = new CawZFMonthXCTZ().Select(this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
Exemplo n.º 8
0
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum = 0;
            DataView dv = new CawVigillicenceDB().Select(Session["ORGID"].ToString(), this.txtName.Text.Trim(), this.DateSend.FromText, this.DateSend.ToText, this.drgStatus.SelectedIndex == 0 ? "" : this.drgStatus.SelectedValue, Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum=0;
            DataView dv = CBA.Select(Session["ORGID"].ToString(), txtProject.Text.Trim(), AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
             GridView1.DataSource = dv;
             GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        private void refresh()
        {
            int TotalNum = 0;

            GridView1.DataSource = new CawInfoRecord().SelectByContition(this.ddlStatus.SelectedValue, Session["ORGID"].ToString(), this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        private void refresh()
        {
            int TotalNum = 0;

            GridView1.DataSource = new CawZFDailyXCTZ().Select(string.IsNullOrEmpty(this.dftdate.FromText)?DateTime.MinValue:Convert.ToDateTime(dftdate.FromText), string.IsNullOrEmpty(dftdate.ToText)?DateTime.MaxValue:Convert.ToDateTime(dftdate.ToText), this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        private void refresh()
        {
            int TotalNum = 0;

            GridView1.DataSource = new CawInfoSecReport().SelectByTime(this.dftREPORTDATE.FromText, this.dftREPORTDATE.ToText, Session["ORGID"].ToString(), this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum = 0;
            DataView dv = new CAW_SecSpecialEvents().SelectList(dftDateSch.FromText.Trim(), dftDateSch.ToText.Trim(), AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
             GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum = 0;
            DataView dv = new CawPortMarkoutDB().Select(txtNameSch.Text.Trim(),dftApproveDateSch.FromText.Trim(),dftApproveDateSch.ToText.Trim(),ddlStatus.SelectedItem.Value.Trim(), AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum = 0;
            DataView dv = new CawSecAgencyPeople().SelectList(ViewState["AgencyGuid"].ToString(), txtName.Text.Trim(), AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum = 0;
            DataView dv = new CawBussinessOffDB().Select(Session["ORGID"].ToString(), Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
 protected void Refresh()
 {
     bool IsKAW = Convert.ToString(Session["IsCAW"]) == "Y" ? true : false;
     int TotalNum = 0;
     DataView dv = PI.SelectPubInfo(IsKAW, false, DateFromTo1.FromText.Trim(), DateFromTo1.ToText.Trim(), txtTitle.Text.Trim(), ddlType.SelectedItem.Value, Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
     FC.SetPagerInfo(AspNetPager1, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
     CallJsFun("ChangeColor();");
 }
 /// <summary>
 /// 选择数据
 /// </summary>
 protected void refresh()
 {
     int TotalNum = 0;
     string CompanyGuid = this.ddlCorp.SelectedIndex == 0 ? "" : this.ddlCorp.SelectedItem.Value;
     int Year = this.ddlYear.SelectedIndex == 0 ? 0 : Convert.ToInt16(this.ddlYear.SelectedItem.Text.Trim());
     DataView dv = new CawYearAssess().Select(CompanyGuid, Year, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");
     //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
     CallJsFun("ChangeColor();");
 }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            int TotalNum = 0;
            int Year = ddlYearSch.SelectedIndex == 0 ? -1 : Convert.ToInt32(ddlYearSch.SelectedItem.Text.Trim());
            DataView dv = new CawPortPlanDB().Select(txtNameSch.Text.Trim(), Year, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        private void refresh()
        {
            int TotalNum = 0;
            string DealGoodsGuid = Session["ORGID"].ToString();
            DataView dv = new CawInfoDealGoods().SelectDealShipInfos(DealGoodsGuid, this.txtShipName.Text, this.dftArrive.FromText.Trim(), this.dftArrive.ToText.Trim(), this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
        private void refresh()
        {
            int TotalNum = 0;
            string CompanyGuid = Session["ORGID"].ToString();
            string Status = this.ddlStatus.SelectedIndex == 0 ? "" : this.ddlStatus.SelectedItem.Value;
            GridView1.DataSource = new CawInfoDealGoods().SelectDealGoodsInfo(CompanyGuid, this.dftDealdate.FromText, this.dftDealdate.ToText, Status, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum);
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
Exemplo n.º 22
0
        protected void BindGrid()
        {
            int TotalNum = 0;
            DataView dv = new FrameSearchDesign().Select(txtTitle.Text.Trim(),txtDescription.Text.Trim(), Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
            grdList.DataSource = dv;
            grdList.DataBind();
            FrameCommon FC = new FrameCommon();
            //���÷�ҳ��Ϣ
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);

            //����һ��js����������ǿ��ִ��datagrid����ɫ�任���粻�ã���updatapanel�����ݸ��º��޷�����datagridcolor.js��ִ��
            CallJsFun("ChangeColor();");
        }
Exemplo n.º 23
0
        private void InitiData()
        {
            int TotalNum = 0;
            string TableFlag = this.drgClass.SelectedIndex == 0 ? "" : this.drgClass.SelectedItem.Value;
            this.GridView1.DataSource = CNB.Select(TableFlag, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum);
            this.GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
Exemplo n.º 24
0
        protected void BindGrid()
        {
            int  TotalNum=0;
            DataView dv = new FrameLog().Select(txtOperateModule.Text.Trim(), txtOperateUserID.Text.Trim(),DateFromTo.FromText, DateFromTo.ToText, Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
            grdList.DataSource = dv;
            grdList.DataBind();
            FrameCommon FC = new FrameCommon();
            //���÷�ҳ��Ϣ
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);
            FC.SetPagerInfo(AspNetPager1, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);

            //����һ��js����������ǿ��ִ��datagrid����ɫ�任���粻�ã���updatapanel�����ݸ��º��޷�����datagridcolor.js��ִ��
            CallJsFun("ChangeColor();");
        }
        private void Pre()
        {
            int TotalNum = 0;

            DataView dv = bmy.SelectByCon(this.ddlInOut.SelectedValue,this.ddlYear.SelectedValue, this.ddlMonth.SelectedValue, Convert.ToInt32(this.ddlIsMonth.SelectedValue), this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, out TotalNum, Session["ORGID"] as string);
            this.DataGrid1.DataSource = dv;
            this.DataGrid1.DataBind();

            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            new BasePage().CallJsFun("ChangeColor();");
        }
 protected void Refresh()
 {
     int TotalNum = 0;
     DataView dv = PI.SelectPubInfo(true,true, DateFromTo1.FromText.Trim(), DateFromTo1.ToText.Trim(), txtTitle.Text.Trim(),ddlType.SelectedItem.Value, Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);
     if (chbCheckPass.Checked) //选择审核未通过
     {
         dv.RowFilter = " CHECKPASS='N'";
     }
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
     FC.SetPagerInfo(AspNetPager1, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");
     CallJsFun("ChangeColor();");
 }
Exemplo n.º 27
0
        protected void Refresh()
        {
            int TotalNum = 0;
            string UserID = Convert.ToString(Session["UserID"]);
            DataView dv = SD.Select(UserID, this.txtSender.Text.Trim().Replace("'", ""), this.DateSend.FromText.Trim(), this.DateSend.ToText.Trim(), Pager.PageSize, Pager.CurrentPageIndex, out TotalNum);

            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            //设置分页信息
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);
            FC.SetPagerInfo(AspNetPager1, TotalNum, Pager.PageSize, Pager.CurrentPageIndex);

            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }
Exemplo n.º 28
0
        protected void GetInfo()
        {
            FrameConfig FC=new FrameConfig();
            txtServerMail.Text = FC.GetDetail("ServerMail").ConfigValue.Trim();
            txtTitle.Text = FC.GetDetail("ErrorReportMailTitle").ConfigValue.Trim();
            txtMailBody.Text = FC.GetDetail("ErrorReportMailBody").ConfigValue;

            string ConfigStr = FC.GetDetail("HostMail").ConfigValue;
            FrameCommon FComm = new FrameCommon();
            txtSenderName.Text = FComm.FindValueFromStr(ConfigStr, "FromName=").Trim();
            txtSenderEmail.Text = FComm.FindValueFromStr(ConfigStr, "UserName=").Trim();
            txtEmailPassword.Text = FComm.FindValueFromStr(ConfigStr, "Password=").Trim();
            txtPort.Text = FComm.FindValueFromStr(ConfigStr, "Port=").Trim();
            txtSMTP.Text = FComm.FindValueFromStr(ConfigStr, "Host=").Trim();
            chbSSL.Checked = FComm.FindValueFromStr(ConfigStr, "EnableSsl=").Trim() == "1" ? true : false;
            chbAsy.Checked = FComm.FindValueFromStr(ConfigStr, "SendAsync=").Trim() == "1" ? true : false;

            txtPop3Host.Text = FComm.FindValueFromStr(ConfigStr, "POP3Host=").Trim();
            txtPop3Port.Text = FComm.FindValueFromStr(ConfigStr, "POP3Port=").Trim();
        }
Exemplo n.º 29
0
 /// <summary>
 /// 选择数据
 /// </summary>
 protected void refresh()
 {
     int TotalNum = 0;
     string AgentGuid = "";
     string CompanyGuid = Session["ORGID"].ToString();
     string Is_Agent = ViewState["IS_AGENT"].ToString();
     if (Is_Agent == "1")
     {
         AgentGuid = Session["ORGID"].ToString();
         CompanyGuid = this.ddlCorp.SelectedIndex == 0 ? "" : this.ddlCorp.SelectedItem.Value.Trim();
     }
     DataView dv = new CawZuoyeEndDB().Select(Is_Agent, CompanyGuid, AgentGuid, this.dftEnd.FromText.Trim(), this.dftEnd.ToText.Trim(), Pager1.PageSize, Pager1.CurrentPageIndex, out TotalNum);
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(Pager1, TotalNum, Pager1.PageSize, Pager1.CurrentPageIndex, "");
     FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");
     //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
     CallJsFun("ChangeColor();");
 }
        private void InitData()
        {
            int TotalNum = 0;
            string Msg="";
            new CawDBInfo().GetApprovalList(this.GridView1, Request.QueryString["tablename"].ToUpper(),
                                            this.drgCompany.SelectedIndex == 0 ? "" : this.drgCompany.SelectedValue,
                                            this.DateSend.FromText.Trim(), this.DateSend.ToText.Trim(),
                                            Pager.PageSize, Pager.CurrentPageIndex, out TotalNum, out Msg);
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(Pager, TotalNum, Pager.PageSize, Pager.CurrentPageIndex, "");

            if (Msg.Trim() != "")
            {
                CallJsFun("alert('初始化数据发生" + Msg + "错误');");
            }

            if (!new WorkFlowDB().HasBackRight(Session["UserID"].ToString(), Request.QueryString["tableflag"]))
            {
                foreach (DataGridItem item in this.GridView1.Items)
                {
                    item.Cells[2].Enabled = false;
                }
            }
        }