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

        var m = db.sp_web_loadKCSManufacture(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.DesignName + "\",\"" + item.SupplierName + "\"," + 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 if (item.StatusId == 2)
            {
                label = "label label-primary";
            }
            else
            {
                label = "label label-warning";
            }

            result += "<td><label class='" + label + "'>" + item.Status + "</label></td>";
            result += "<td>" + item.SupplierName + "</td>";
            result += "<td>" + item.KCSName + "</td>";
            result += "<td>" + item.CompleteAt + "</td>";
            result += "<td>" + item.FormCode + " - " + item.FormName + "</td>";
            result += "<td>" + item.DesignName + "</td>";
            result += "</tr>";
            i++;
        }
        return(result);
    }