1. Recently, the excel upload function has been used in the project. There are many uploading methods on the Internet. Here, only the excel files used for conversion to dataset are sorted out:
DataSet ExecleDs( filenameurl, = strConn = + + filenameurl + ; OleDbConnection conn = = OleDbDataAdapter(
It is worth noting that the table is a file name that does not have an extension after processing through System. IO. Path. GetFileNameWithoutExtension (filenameurl;
2. The project has similar requirements:
When jqgrid is added or modified, the related second-level unit information is obtained according to the order number obtained by fuzzy query. For details about the parameters of jqgrid, refer to (http://www.cnblogs.com/younggun/archive/2012/08/27/2657922.html). The specific implementation method is as follows:
{Name: "OrderNo", width: 130, editable: true, editrules: {required: true}, formoptions: {elmsuffix: ("<span style = 'color: red'> * </span> ")},
Editoptions: {dataInit: loadAutoCompleteTransportPlan }},
{Name: 'hiherauthoritycode', width: 100, editable: true, editrules: {required: true}, formoptions: {elmsuffix: ("<span style = 'color: red'> * </span> ")}, edittype: 'select', editoptions: {maxlength: 50, dataUrl :""}},
OrderNo is the order number and HigherAuthorityCode is the second-level unit. The cascade control method is as follows:
, Change: function (e) {// change event
TypeCode = document. getElementById (typeCode = | typeCode =: document. getElementById (strhcode = "" $. ajax ({url: data: (I =; I <data. length; I ++ (I! = Length-1 strhcode + = "<option>" + data [I]. HigherAuthorityCode + "</option> ;"}
Strhcode + = "<option>" + data [I]. HigherAuthorityCode + "</option> "}
// Document. getElementById (). value = higherAuthoritycode = $ ("select # HigherAuthorityCode"); higherAuthoritycode. append (strhcode );
}
})};