public static string getAllAsset(string prefixText, string companyid, string isapprove, string empid) { Cls_Asset objts = new Cls_Asset(); DataSet ds1 = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objts.name = ""; if (isapprove == "1") { objts.nid = ""; objts.action = "selectforautocompleter"; } else { objts.action = "selectforautocompleterbuemp"; objts.nid = empid; } objts.companyId = companyid; ds1 = objts.ManageAsset(); string result = objgen.serilizeinJson(ds1.Tables[0]); return(result); }
public static string getAssetDetail(string nid) { StringBuilder sb = new StringBuilder(); Cls_Asset objts = new Cls_Asset(); DataSet ds = new DataSet(); objts.action = "select"; objts.nid = nid; ds = objts.ManageAsset(); if (ds.Tables[0].Rows.Count > 0) { sb.Append(ds.Tables[0].Rows[0]["assetname"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["assetCode"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["categoryname"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["Location"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["transferedon"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["transferid"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["transferDate"].ToString() + "###"); } return(sb.ToString()); }
public static string getAllAssetData(string nid) { StringBuilder sb = new StringBuilder(); assetId = nid; Cls_Asset objts = new Cls_Asset(); DataSet ds = new DataSet(); objts.action = "select"; objts.nid = nid; ds = objts.ManageAsset(); if (ds.Tables[0].Rows.Count > 0) { currentLocation = ds.Tables[0].Rows[0]["currentLocation"].ToString(); sb.Append(ds.Tables[0].Rows[0]["assetname"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["assetCode"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["categoryname"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["currentLocation"].ToString() + "###"); sb.Append(ds.Tables[0].Rows[0]["creationdate"].ToString() + "###"); } return(sb.ToString()); }
public static string getImagesPath(string assetId) { StringBuilder sb = new StringBuilder(); Cls_Asset objAsset = new Cls_Asset(); DataSet ds = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objAsset.AssetId = assetId; // objAsset.companyId = Session["companyid"].ToString(); objAsset.action = "selectforhistory"; ds = objAsset.trasferAssets(); sb.Append('{'); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { switch (ds.Tables[0].Rows[i]["transferTo"].ToString()) { case "Individual": { if (ds.Tables[0].Rows[i]["imgurl"].ToString() != "") { sb.Append("\"pathImage" + i + "\"" + ":\"" + "webfile//profile//thumb//" + ds.Tables[0].Rows[i]["imgurl"].ToString() + "@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); } else { sb.Append("\"pathImage" + i + "\"" + ":\"images//" + "Individualss.png@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); } break; } case "Stock": { sb.Append("\"pathImage" + i + "\"" + ":\"images//" + "Stocks.png@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); break; } case "Store": { sb.Append("\"pathImage" + i + "\"" + ":\"images//" + "Stores.png@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); break; } case "Inuse": { sb.Append("\"pathImage" + i + "\"" + ":\"images//" + "InUses.png@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); break; } case "Repair": { sb.Append("\"pathImage" + i + "\"" + ":\"images//" + "Repairs.png@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); break; } } if (i != ds.Tables[0].Rows.Count - 1) { sb.Append(','); sb.Append("\"pathImage" + i + 0 + 0 + "\"" + ":\"images//" + "arrows.png@" + ds.Tables[0].Rows[i]["transferdate"].ToString() + "@" + ds.Tables[0].Rows[i]["Location"].ToString() + "\""); sb.Append(','); } } sb.Append('}'); return(sb.ToString()); }