protected void btnEdit_Click(object sender, EventArgs e) { string result = ""; string shipmentid = ""; for (int i = 0; i <= grd.Rows.Count - 1; i++) { CheckBox cbx = (CheckBox)grd.Rows[i].FindControl("cbx"); if (cbx.Checked == true) { //result = ManageColor.DeleteColor(UserGrd.Rows[i].Cells[1].Text, UserGrd.Rows[i].Cells[2].Text); result = ShipmentManage.DelShipmentInfo(grd.Rows[i].Cells[1].Text, grd.Rows[i].Cells[3].Text);//Userdata.DelUser(grd.Rows[i].Cells[1].Text); if (result != "success") { JScript.Alert("删除批次号失败!", this); } shipmentid = grd.Rows[i].Cells[1].Text; } } if (result == "success") { JScript.Alert("批次删除成功!", this); Databind(shipmentid); } }
private void Databind() { DataTable dt = ShipmentManage.FinalShipmentQuery(ddlWorkshop.SelectedValue, txtShipmentID.Text, txtBegintime.Text, txtEndtime.Text, txtLotid.Text, txtPinmin.Text, txtType.Text ); grd.DataSource = dt; grd.DataBind(); //Nmtree.MergeGridViewCell.MergeRow(grd,0,7); }
protected void btnReset_Click(object sender, EventArgs e) { DataTable dt = (DataTable)ViewState["dt"]; if (dt.Rows.Count == 0) { return; } string result = ShipmentManage.ConfirmShipment(ViewState["shipmentid"].ToString()); if (result == "success") { JScript.AlertAndRedirect("最终出库成功", "ShipmentManage.aspx", this); } else { JScript.Alert("出库失败", this); } }