示例#1
0
    public string loadForm(string status, string supplier)
    {
        string result = ""; int i = 1;
        string label = "";

        var m = db.sp_web_loadOutSourcing(status.Trim(), supplier.Trim());

        byte edit = 0;

        foreach (var item in m.ToList())
        {
            edit = item.StatusId.Value;

            result += "<tr data-toggle='modal' data-target='#addDept' class='detail-rows' onclick='update_modal(\"" + item.Id.ToString() + "\",\"" + item.FormId.ToString() + "\",\"" + item.FormName + " | " + item.FormCode + " - " + item.DesignBy + "\",\"" + item.DateCreate + "\",\"" + item.DateExpect + "\",\"" + item.SupplierId + "\",\"" + item.Note + "\"," + edit + ");' id='delete" + item.Id.ToString() + "' title='Click để xem chi tiết'>";
            result += "<td class='center'>" + i.ToString() + "</td>";

            if (item.StatusId == 1)
            {
                label = "blink label label-success";
            }
            else
            {
                label = "label label-primary";
            }

            result += "<td><label class='" + label + "'>" + item.Status + "</label></td>";
            result += "<td>" + item.SupplierName + "</td>";
            result += "<td>" + item.DateCreate + "</td>";
            result += "<td>" + item.DateExpect + "</td>";
            result += "<td>" + item.DateReceiver + "</td>";
            result += "<td>" + item.FormCode + " - " + item.FormName + "</td>";
            result += "<td>" + item.DesignBy + "</td>";
            result += "<td>" + item.Description + "</td>";
            result += "<td>" + item.CutUserBy + "</td>";
            result += "<td>" + item.Note + "</td>";
            result += "</tr>";
            i++;
        }
        return(result);
    }