예제 #1
0
    protected void rptPL_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView drv = e.Item.DataItem as DataRowView;

        if (drv == null)
        {
            return;
        }

        POLineStatus status    = Cast.Enum <POLineStatus>(drv["LineStatus"]);
        Label        lblStatus = e.Item.FindControl("lblLineStatus") as Label;

        lblStatus.Text = POLine.POLineStatusText(status);
        HtmlInputCheckBox chk;

        switch (status)
        {
        case POLineStatus.Open:
            lblStatus.ForeColor = System.Drawing.Color.Blue;
            break;

        case POLineStatus.Close:
            lblStatus.ForeColor = System.Drawing.Color.Black;
            chk         = e.Item.FindControl("checkbox") as HtmlInputCheckBox;
            chk.Visible = false;
            break;

        case POLineStatus.Cancel:
            lblStatus.ForeColor = System.Drawing.Color.Gray;
            break;
        }
    }
예제 #2
0
 public static string POLineStatusText(POLineStatus statusValue)
 {
     switch (statusValue)
     {
         case POLineStatus.Open: return "有效";
         case POLineStatus.Cancel: return "取消";
         case POLineStatus.Close: return "已完成";
     }
     return "";
 }
예제 #3
0
        public static string POLineStatusText(POLineStatus statusValue)
        {
            switch (statusValue)
            {
            case POLineStatus.Open: return("有效");

            case POLineStatus.Cancel: return("取消");

            case POLineStatus.Close: return("已完成");
            }
            return("");
        }