| | |
| | | /// |
| | | /// </summary> |
| | | /// <param name="positionNames"></param> |
| | | /// <param name="place">1=库存查询,2=入库单</param> |
| | | public FrmPVClist(string positionNames,int place) |
| | | /// <param name="place">1=库存查询,2=入库单,3=推送MES详情</param> |
| | | public FrmPVClist(string positionNames, int place,long mainId) |
| | | { |
| | | InitializeComponent(); |
| | | this.dataGridView1.AutoGenerateColumns = false; |
| | | this.Text = positionNames; |
| | | getData(positionNames, place); |
| | | getData(positionNames, place, mainId); |
| | | |
| | | } |
| | | private void getData(string positionNames, int place) |
| | | private void getData(string positionNames, int place, long mainId) |
| | | { |
| | | try |
| | | { |
| | | |
| | | if (place==1) |
| | | |
| | | if (place == 1) |
| | | { |
| | | var res = FLogin.wcsWcf.findStockList(positionNames); |
| | | var res = FLogin.wcsWcf.findStockList(positionNames); |
| | | if (res.status == 200) |
| | | { |
| | | dataGridView1.DataSource = res.date; |
| | | |
| | | } |
| | | else |
| | | { |
| | | WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, res.msg); |
| | | ms.Show(); |
| | | } |
| | | } |
| | | else if(place == 3) |
| | | { |
| | | var res = FLogin.wcsWcf.findOutInStockRecord_Details_V2_Mes(mainId); |
| | | if (res.status == 200) |
| | | { |
| | | dataGridView1.DataSource = res.date; |
| | |
| | | ms.Show(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void FrmPVClist_FormClosing(object sender, FormClosingEventArgs e) |
| | |
| | | preview.newform.Remove(this.Text); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | private void button_confirm_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | |
| | | try |
| | | { |
| | | if (this.Text.Substring(0, 1) == "G"&&this.Text.Length>4)//保存入库明细 |
| | | if (this.Text.Substring(0, 1) == "G" && this.Text.Length > 4)//保存入库明细 |
| | | { |
| | | |
| | | WMS.yunneiWCS.inStockOrderList[] modifyStockList = (WMS.yunneiWCS.inStockOrderList[])dataGridView1.DataSource; |
| | |
| | | { |
| | | this.Close(); |
| | | } |
| | | |
| | | |
| | | } |
| | | else//保存库存明细 |
| | | { |
| | | WMS.yunneiWCS.productStockList[] modifyStockList = (WMS.yunneiWCS.productStockList[])dataGridView1.DataSource; |
| | | var res = FLogin.wcsWcf.modfiyStockList(modifyStockList,0); |
| | | var res = FLogin.wcsWcf.modfiyStockList(modifyStockList, 0); |
| | | int statu = res.status == 200 ? 1 : 2; |
| | | WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(statu, res.msg); |
| | | ms.Show(); |
| | |
| | | this.Close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception) |
| | | { |
| | |
| | | { |
| | | if (dataGridView1.Columns[e.ColumnIndex].Name == "delete") |
| | | { |
| | | if (this.Text.Substring(0,1)=="G"&&this.Text.Length>4)//入库单修改 |
| | | if (this.Text.Substring(0, 1) == "G" && this.Text.Length > 4)//入库单修改 |
| | | { |
| | | WMS.yunneiWCS.inStockOrderList[] modifyStockList = (WMS.yunneiWCS.inStockOrderList[])dataGridView1.DataSource; |
| | | var modfiy = modifyStockList.ToList(); |
| | |
| | | dataGridView1.DataSource = null; |
| | | dataGridView1.DataSource = modfiy.ToArray(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | SolidBrush b = new SolidBrush(this.dataGridView1.RowHeadersDefaultCellStyle.ForeColor); |
| | | e.Graphics.DrawString((e.RowIndex + 1).ToString(System.Globalization.CultureInfo.CurrentUICulture), this.dataGridView1.DefaultCellStyle.Font, b, e.RowBounds.Location.X + 20, e.RowBounds.Location.Y + 4); |
| | | |
| | | |
| | | } |
| | | } |
| | | } |