private void Delete() { string guidList = Request.Params["Guid"]; string rslt = string.Empty; if (!string.IsNullOrEmpty(guidList)) { Model.Application apply = new Model.Application(); Model.BulkFreight bulk = new Model.BulkFreight(); Model.SCW scw = new Model.SCW(); string[] guid = guidList.Split(','); foreach (var item in guid) { apply.Guid = item; bulk.AppGuid = item; scw.AppGuid = item; try { CNVP.Data.Application bll = new CNVP.Data.Application(); bll.ApplyDelete(apply, scw, bulk); rslt = "1"; } catch (Exception e) { rslt = "0"; } finally { } } Response.Write("{\"result\":\"" + rslt + "\"}"); Response.End(); } }
/// <summary> /// 编辑申请单 /// </summary> private void EditApply(int editState) { string applyId = Request.Params["applyId"]; string scwId = Request.Params["scwId"]; string bulkId = Request.Params["bulkId"]; //散装货物表ID 不能传入string类型,新定义一个字段存入ID string applyGuid = Request.Params["applyGuid"]; string appState = Request.Params["appState"]; string appPage = Request.Params["appPage"]; CNVP.UI.FileUpload upload = new UI.FileUpload(); Model.Application appli = new Model.Application(); Model.SCW scw = new Model.SCW(); Model.Source source = new Model.Source(); Model.BulkFreight bulk = new Model.BulkFreight(); //项目申请单 appli.UpdateModel(); appli.Id = Convert.ToInt32(applyId); appli.IO = Convert.ToInt32(IO.SelectedValue); appli.AppState = editState; //安全适运单 if (appli.IO == 1) { CNVP.UI.Application _apply = new UI.Application(); scw.UpdateModel(); //scw.ExatrCertificate = _apply.GetCheck(ExatrCertificate, ","); scw.GoodsGroup = GoodsGroup.SelectedValue; scw.Id = Convert.ToInt32(scwId); } //附件上传 source.AppGuid = applyGuid; //source.CreateTime = DateTime.Now; source.SourceUrl = upload.UploadPic(); source.UserId = Convert.ToInt32(UserLoginInfo.UserLoginID); //散装货物上传 //bulk.Id = Request.Params["bulkId"]; bulk.BfGoodsName = Request.Params["BfGoodsName"]; bulk.BfGoodsGroup = Request.Params["BfGoodsGroup"]; bulk.Class = Request.Params["Class"]; bulk.DangerousNo = Request.Params["DangerousNo"]; bulk.BfTotalWeight = Request.Params["BfTotalWeight"]; bulk.DischargingPort = Request.Params["DischargingPort"]; bulk.Position = Request.Params["Position"]; bulk.Remark = Request.Params["Remark"]; CNVP.Data.Application bll = new CNVP.Data.Application(); bll.Edit(appli, scw, source, bulk, bulkId); MessageBox.ShowMessage("修改提交成功!", "ApplicationList.aspx?State=" + appState + "&page=" + appPage); }