コード例 #1
0
        protected void btnBackUp_Click(object sender, EventArgs e)
        {
            Timer1.Enabled = true;
            SetBtnEnable(false);
            SetDownloadFileDisplay(false);
            BackUpStatus bus = new BackUpStatus();

            Session["DtStatus"] = bus;

            TransferRule tr = RulesPool.FindRuleByName(ddlAllRules.SelectedItem.Text);

            if (tr != null)
            {
                if (tr.GetNeedTimeFilter())
                {
                    DateTime startTime;
                    DateTime endTime;
                    if (!DateTime.TryParse(txtStartTime.Text, out startTime) || !DateTime.TryParse(txtEndTime.Text, out endTime))
                    {
                        lblMessage.Text = _TimeNeed;
                        Message.Visible = true;
                        return;
                    }
                    TryRunBackUp(startTime, endTime, bus);
                }
                else
                {
                    TryRunBackUp(null, null, bus);
                }
            }
        }
コード例 #2
0
        private TransferRule GetCurrentSelectedRule()
        {
            string ruleName = ddlAllRules.SelectedItem.Text;

            if (string.IsNullOrEmpty(ruleName))
            {
                return(null);
            }
            return(RulesPool.FindRuleByName(ruleName));
        }
コード例 #3
0
        private void SelectRuleChanged()
        {
            string ruleName = ddlAllRules.SelectedItem.Text;

            if (string.IsNullOrEmpty(ruleName))
            {
                return;
            }

            TransferRule tr = RulesPool.FindRuleByName(ruleName);

            if (tr != null)
            {
                SetTimeParameterDisplay(tr.GetNeedTimeFilter());
            }
        }