private void Btn_delete_Click(object sender, EventArgs e) { var row = data_area.SelectedRows[0]; AreaManage.RemoveMateriel(row.Cells[0].Value.ToString(), row.Cells[1].Value.ToString()); MessageBox.Show("删除成功!"); }
private void Btn_select_Click(object sender, EventArgs e) { var materiels = AreaManage.SelectMaterielByArea(cbareacode.SelectedItem.ToString()); data_area.Rows.Clear(); materiels.ForEach(materiel => { data_area.Rows.Add(materiel.AreaCode, materiel.MaterielCode); }); }
private void Btn_select_area_Click(object sender, EventArgs e) { data_area.Rows.Clear(); var areas = AreaManage.SelectArea(cbWares_area.SelectedItem.ToString()); areas.ForEach(area => { data_area.Rows.Add(area.areacode, area.areaname, area.warecode); }); }
private void Btn_select_areas_Click(object sender, EventArgs e) { cbareas.Items.Clear(); var areas = AreaManage.SelectArea(WareCode); areas.ForEach(area => { cbareas.Items.Add(area.areacode); }); cbareas.SelectedItem = AreaCode; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["Id"] != null) { AreaManage a = new AreaManage(); a = mss.GetArea(int.Parse(Request.QueryString["Id"].ToString())); con.InnerHtml = a.Body; } } }
private void Btn_add_Click(object sender, EventArgs e) { Area area = new Area(); area.warecode = txtwarecode.Text; area.areacode = txtareacode.Text; area.areaname = txtareaname.Text; AreaManage.AddArea(area); MessageBox.Show("添加完成!"); Close(); }
private void Btn_selectareas_point_Click(object sender, EventArgs e) { cbareas_point.Items.Clear(); cbareas_point.Items.Add("全部区域"); var areas = AreaManage.SelectArea(cbwares_point.SelectedItem.ToString()); areas.ForEach(area => { cbareas_point.Items.Add(area.areacode); }); if (cbareas_point.Items.Count > 0) { cbareas_point.SelectedIndex = 0; } }
private void FrmSetMateriel_Load(object sender, EventArgs e) { var areas = AreaManage.SelectArea(WareCode); cbareacode.Items.Clear(); areas.ForEach(area => cbareacode.Items.Add(area.areacode)); cbareacode.SelectedItem = AreaCode; var materiels = MaterielManage.SelectMateriel(); cbmaterielcode.Items.Clear(); materiels.ForEach(materiel => cbmaterielcode.Items.Add(materiel.materielcode)); if (cbmaterielcode.Items.Count > 0) { cbmaterielcode.SelectedIndex = 0; } }
public async Task <AreaManage> UpdateAreaManage(AreaManage AreaManageInfo) { return(await _repository.UpdateAsync(AreaManageInfo)); }
public async Task <AreaManage> CreateAreaManage(AreaManage AreaManageInfo) { AreaManageInfo.Id = await _repository.InsertAndGetIdAsync(AreaManageInfo); return(AreaManageInfo); }
private void Button1_Click(object sender, EventArgs e) { AreaManage.RemovePoint(cbareas.SelectedItem.ToString(), data_point.SelectedRows[0].Cells[0].Value.ToString()); MessageBox.Show("删除完成!"); }
public int SaveAreaManage(AreaManage area) { return(_set.SaveAreaManage(area)); }
private void Btn_add_Click(object sender, EventArgs e) { AreaManage.SetMateriel(cbareacode.SelectedItem.ToString(), cbmaterielcode.SelectedItem.ToString()); MessageBox.Show("添加完成!"); }
private void Btn_add_Click(object sender, EventArgs e) { AreaManage.SetPoint(txtareacode.Text, cbpointcode.SelectedItem.ToString()); MessageBox.Show("添加完成!"); Close(); }