protected void BandHWGZ() { DataSet ds = null; ds = HWGZ.GetHWGZList(); GridSX.DataSource = ds.Tables[0]; GridSX.DataBind(); }
protected void btnSpeSave_Click(object sender, EventArgs e) { if ((PHSET.SelectedIndex == 3) && (PH.Text.Trim() == "")) { Alert.Show("设定特定牌号规则必须录入牌号!"); return; } if ((GGSET.SelectedIndex == 3) && (GG.Text.Trim() == "")) { Alert.Show("设定特定规格规则必须录入规格!"); return; } if ((PCHSET.SelectedIndex == 3) && (PCH.Text.Trim() == "")) { Alert.Show("设定特定批次规则必须录入批次!"); return; } if ((SXSET.SelectedIndex == 3) && (SX.SelectedValue.Trim() == "无")) { Alert.Show("设定特定属性规则必须选择属性!"); return; } if ((PCINFOSET.SelectedIndex == 3) && (PCINFO.Text.Trim() == "")) { Alert.Show("设定特定特殊信息规则必须填写特殊信息!"); return; } if ((WLHSET.SelectedIndex == 3) && (WLH.Text.Trim() == "")) { Alert.Show("设定特定物料信息规则必须填写特殊信息!"); return; } if (string.IsNullOrEmpty(this.txtYXJ.Text)) { Alert.Show("优先级为必填项!"); return; } string ret = HWGZ.SaveHWSet(fid.Text, PHSET.SelectedValue, PH.Text, GGSET.SelectedValue, GG.Text, PCHSET.SelectedValue, PCH.Text, SXSET.SelectedValue, SX.SelectedValue, PCINFOSET.SelectedValue, PCINFO.Text, WLHSET.SelectedValue, WLH.Text, YX.SelectedValue, this.txtYXJ.Text); try { int vvv = int.Parse(ret); ClearInput(); BandHWGZ(); Alert.Show("保存成功!"); } catch (Exception ex) { Alert.Show("保存失败:" + ret); } }
protected void btnSpeDel_Click(object sender, EventArgs e) { if (fid.Text == "") { Alert.Show("请选择"); return; } string ret = HWGZ.DeleteHWSET(fid.Text); if (ret != "") { Alert.Show("操作失败:" + ret); } else { ClearInput(); BandHWGZ(); Alert.Show("操作成功!"); } }