Пример #1
0
 private void btnok_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> list = this.gvjob.GetSelectedRows().Where(a => a >= 0).ToList();
         if (this.Cur_popc == null || list == null || list.Count <= 0)
         {
             return;
         }
         foreach (int rowhanlde in list)
         {
             JobInfoSyncData info = this.gvjob.GetRow(rowhanlde) as JobInfoSyncData;
             if (this.Cur_popc == this.popctarget)
             {
                 info.targetdbtype   = this.cbetdbtype.SelectedIndex;
                 info.targetdbstring = this.txttstr.Text.Trim();
             }
             else
             {
                 info.sourcedbtype   = this.cbesdbtype.SelectedIndex;
                 info.sourcedbstring = this.txtsstr.Text.Trim();
             }
         }
         this.Cur_JobInfo.Save();
         MessageBox.Show("配置传递成功", "操作提示", MessageBoxButtons.OK);
     }
     catch (Exception ex)
     {
         Log4netUtil.Error("配置传递失败", ex);
     }
 }
Пример #2
0
        public override bool CollectChildJobInfo()
        {
            JobInfoSyncData job = this.Cur_JobInfo as JobInfoSyncData;

            job.targetdbtype   = this.cbetdbtype.SelectedIndex;
            job.isbulkop       = this.cbtop.SelectedIndex == 0 ? true : false;
            job.targetdbstring = this.txttstr.Text.Trim();
            job.tmpname        = this.txttmpname.Text.Trim();
            job.createtmp      = this.txttmp.Text.Trim();
            job.targetsql      = this.rttscript.Text.Trim();
            job.sourcetype     = this.rbsweb.Checked ? 0 : 1;
            job.servertype     = this.cbstype.SelectedIndex;
            job.servermethod   = this.txtMethod.Text.Trim();
            job.weburl         = this.txturl.Text.Trim();
            job.nodelx         = this.cbejxlx.SelectedIndex;
            job.node           = this.tenode.Text.Trim();
            job.xmlconfig      = this.rtbxml.Text.Trim();
            job.sourcedbtype   = this.cbesdbtype.SelectedIndex;
            job.sourcedbstring = this.txtsstr.Text.Trim();
            job.sourcesql      = this.rtsscript.Text.Trim();
            return(true);
        }
Пример #3
0
        public override void LoadChildInfo()
        {
            JobInfoSyncData job = this.Cur_JobInfo as JobInfoSyncData;

            this.cbtop.SelectedIndex      = job.isbulkop ? 0 : 1;
            this.gsource.Enabled          = job.isbulkop;
            this.cbetdbtype.SelectedIndex = job.targetdbtype;
            this.txttstr.Text             = job.targetdbstring;
            this.txttmpname.Text          = job.tmpname;
            this.txttmp.Text              = job.createtmp;
            this.rttscript.Text           = job.targetsql;
            this.rbsweb.Checked           = job.sourcetype == 0;
            this.rbsdb.Checked            = job.sourcetype == 1;
            this.cbstype.SelectedIndex    = job.servertype;
            this.txtMethod.Text           = job.servermethod;
            this.txturl.Text              = job.weburl;
            this.cbejxlx.SelectedIndex    = job.nodelx;
            this.tenode.Text              = job.node;
            this.rtbxml.Text              = job.xmlconfig;
            this.cbesdbtype.SelectedIndex = job.sourcedbtype;
            this.txtsstr.Text             = job.sourcedbstring;
            this.rtsscript.Text           = job.sourcesql;
        }