private void CheckOrganizeCity()
    {
        IList <SVM_DownloadTemplate> _downlist = SVM_DownloadTemplateBLL.GetModelList("IsOpponent=2 AND State IN (1,2) AND AccountMonth=" + ddl_AccountMonth.SelectedValue);

        foreach (SVM_DownloadTemplate _m in _downlist)
        {
            ListItem item = chk_Citylist.Items.FindByValue(_m["OrganizeCity"]);
            if (!item.Text.EndsWith("已操作"))
            {
                item.Text += "------已操作";
            }
        }
    }
 protected void ddl_AccountMonth2_SelectedIndexChanged(object sender, EventArgs e)
 {
     if ((int)(ViewState["IsOpponent"]) == 3 && SVM_DownloadTemplateBLL.GetModelList("AccountMonth=" + ddl_AccountMonth2.SelectedValue + " AND IsOpponent=3 AND MCS_SYS.dbo.UF_Spilt(ExtPropertys,'|',3)='1'").Count == 0)
     {
         string filename = "办事处月度费率导入模板" + "-" + DateTime.Today.ToString("yyyyMMdd") + ".xls";
         SVM_DownloadTemplateBLL _bll = new SVM_DownloadTemplateBLL();
         _bll.Model.Name            = filename;
         _bll.Model.AccountMonth    = int.Parse(ddl_AccountMonth2.SelectedValue);
         _bll.Model.State           = 1;
         _bll.Model.IsOpponent      = 3;
         _bll.Model.InsertStaff     = (int)Session["UserID"];
         _bll.Model.InsertTime      = DateTime.Now;
         _bll.Model["OrganizeCity"] = "1";
         _bll.Model["UserName"]     = Session["UserName"].ToString();
         _bll.Add();
     }
 }
    protected string GetDownWait(string templateid)
    {
        IList <SVM_DownloadTemplate> downlist = SVM_DownloadTemplateBLL.GetModelList("State=1 AND AccountMonth=" + ddl_AccountMonth.SelectedValue + " AND ID<=" + templateid);

        return(downlist.Count > 0 ? (downlist.Count).ToString() : "");
    }