Beispiel #1
0
 public void MyBind()
 {
     if (Mid > 0)
     {
         M_Sen_Task senMod = senBll.SelReturnModel(Mid);
         Title_T.Text           = senMod.Title;
         Condition_T.Text       = senMod.Condition;
         SuitKey_T.Text         = senMod.SuitKey;
         SType_DP.SelectedValue = senMod.SType;
         Status_Chk.Checked     = senMod.Status == 1;
         function.Script(this, "SetChkVal('source_chk','" + senMod.Source + "');");
     }
 }
 public void MyBind()
 {
     if (string.IsNullOrEmpty(Skey))//为空抽出第一个关词的信息
     {
         M_Sen_Task taskMod = taskBll.SelLastModel();
         if (taskMod == null)
         {
             function.WriteErrMsg("尚未定义任务,无法抓取数据");
         }
         Response.Redirect("DataList.aspx?Skey=" + HttpUtility.UrlEncode(taskMod.Condition));
     }
     else
     {
         EGV.DataSource = sdataBll.SelByKey(Skey, Source);
         EGV.DataBind();
     }
 }
Beispiel #3
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_Sen_Task senMod = new M_Sen_Task();

            if (Mid > 0)
            {
                senMod = senBll.SelReturnModel(Mid);
            }
            senMod.Title     = Title_T.Text;
            senMod.Source    = Request.Form["source_chk"];
            senMod.Condition = Condition_T.Text;
            senMod.SuitKey   = SuitKey_T.Text;
            senMod.SType     = SType_DP.SelectedValue;
            senMod.Status    = Status_Chk.Checked ? 1 : 0;
            if (Mid > 0)
            {
                senBll.UpdateByID(senMod);
            }
            else
            {
                senBll.Insert(senMod);
            }
            Response.Redirect("TaskList.aspx");
        }