protected void btnSpeDelCZ_Click(object sender, EventArgs e) { int vv = GRIDCZSX.SelectedRowIndex; if (vv == -1) { Alert.Show("请选择要删除的称重属性!"); return; } string pcsx = GRIDCZSX.Rows[vv].Values[0]; string mrdj = GRIDCZSX.Rows[vv].Values[1]; string djsx = GRIDCZSX.Rows[vv].Values[2]; string ret = SXSet.DeleteSxSetCZ(pcsx, mrdj, djsx); if (ret != "") { Alert.Show("操作失败:" + ret); } else { ClearInputCZ(); BandCZSX(); Alert.Show("操作成功!"); } }
private void BandCZSX() { DataSet ds = null; ds = SXSet.GetCZSXList(""); GRIDCZSX.DataSource = ds.Tables[0]; GRIDCZSX.DataBind(); }
protected void BandSx() { DataSet ds = null; ds = SXSet.GetSXList(""); GridSX.DataSource = ds.Tables[0]; GridSX.DataBind(); }
private void BandMRDJ() { this.MODJSX.DataValueField = "SX"; this.MODJSX.DataTextField = "SX"; DataSet ds = SXSet.GetSXList(" AND ISKN='Y'"); MODJSX.DataSource = ds; MODJSX.DataBind(); MODJSX.Items.Insert(0, new ExtAspNet.ListItem("请选择", "0")); MODJSX.SelectedIndex = 0; }
protected void BandSX() { DataSet ds = null; ds = SXSet.GetSXList(""); SX.Items.Clear(); SX.Items.Add("无", "无"); foreach (DataRow dr in ds.Tables[0].Rows) { SX.Items.Add(dr["SX"].ToString(), dr["SX"].ToString()); } }
protected void btnSpeDel_Click(object sender, EventArgs e) { int vv = GridSX.SelectedRowIndex; string sx = GridSX.Rows[vv].Values[0]; string ret = SXSet.DeleteSxSet(sx); if (ret != "") { Alert.Show("操作失败:" + ret); } else { ClearInput(); BandSx(); Alert.Show("操作成功!"); } }
protected void btnSpeSave_Click(object sender, EventArgs e) { if (SX.Text.Trim() == "") { Alert.Show("属性不能为空"); return; } string ret = SXSet.SaveSXSet(SX.Text.Trim(), SXName.Text.Trim(), this.ISBATCH.SelectedValue.ToString(), this.ISDEFAULTDJ.SelectedValue.ToString(), this.ISKN.SelectedValue.ToString()); if (ret != "") { Alert.Show("保存失败:" + ret); } else { ClearInput(); BandSx(); Alert.Show("保存成功!"); } }
protected void btnSpeSaveCZ_Click(object sender, EventArgs e) { if (PCSX.SelectedValue == "0") { Alert.Show("批次属性不能为空"); return; } if (DJSX.SelectedValue == "0") { Alert.Show("单卷属性不能为空"); return; } if (MODJSX.SelectedValue == "0") { Alert.Show("默认单卷属性不能为空"); return; } DataSet ds = SXSet.GetCZSXList(" and PCSX='" + PCSX.SelectedValue.ToString() + "' and DJSX='" + DJSX.SelectedValue.ToString() + "' and MRDJSX='" + MODJSX.SelectedValue.ToString() + "'"); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { Alert.Show("批次属性、默认单卷属性、单卷属性对应配置已经存在!"); return; } string ret = SXSet.SaveSXSetCZ(PCSX.SelectedValue.ToString(), MODJSX.SelectedValue.ToString(), DJSX.SelectedValue.ToString(), this.TXTPX.Text); if (ret != "") { Alert.Show("保存失败:" + ret); } else { ClearInputCZ(); BandCZSX(); Alert.Show("保存成功!"); } }