Example #1
0
        private void 查看入库价格来源ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow == null)
            {
                return;
            }
            if ("出库" == dataGridView1.CurrentRow.Cells["出入B"].Value.ToString())
            {
                return;
            }

            string wzbh         = dataGridView1.CurrentRow.Cells["wzbhB"].Value.ToString();
            string djbh         = dataGridView1.CurrentRow.Cells["原始单据B"].Value.ToString();
            string machine_Code = dataGridView1.CurrentRow.Cells["machine_num"].Value.ToString();
            string storeInId    = dataGridView1.CurrentRow.Cells["origin_id"].Value.ToString();

            if (string.IsNullOrEmpty(djbh))
            {
                return;
            }



            if (djbh.Length < 2)
            {
                return;
            }

            string Rs = djbh.Substring(0, 2);

            switch (Rs)
            {
            case "CG":

                LY_GetPurchasePrice queryForm = new LY_GetPurchasePrice();

                queryForm.InStr = djbh;
                queryForm.Code  = wzbh;

                queryForm.StartPosition = FormStartPosition.CenterParent;

                queryForm.ShowDialog();

                break;



            case "GD":

                LY_GetRestructuringPrice queryFormDG = new LY_GetRestructuringPrice();

                queryFormDG.InStr = djbh;
                queryFormDG.Code  = machine_Code;

                queryFormDG.StartPosition = FormStartPosition.CenterParent;

                queryFormDG.ShowDialog();

                break;

            case "GQ":

                LY_GetRestructuringPrice queryFormQG = new LY_GetRestructuringPrice();

                queryFormQG.InStr = djbh;
                queryFormQG.Code  = machine_Code;

                queryFormQG.StartPosition = FormStartPosition.CenterParent;

                queryFormQG.ShowDialog();

                break;

            case "DZ":

                LY_GetQzDzPrice queryFormDZ = new LY_GetQzDzPrice();

                queryFormDZ.InStr = djbh;
                queryFormDZ.Code  = machine_Code;

                queryFormDZ.StartPosition = FormStartPosition.CenterParent;
                queryFormDZ.ShowDialog();

                break;

            case "QZ":

                LY_GetQzDzPrice queryFormQZ = new LY_GetQzDzPrice();

                queryFormQZ.InStr = djbh;
                queryFormQZ.Code  = machine_Code;

                queryFormQZ.StartPosition = FormStartPosition.CenterParent;

                queryFormQZ.ShowDialog();

                break;

            case "ZJ":

                LY_GetMachinePrice queryFormZJ = new LY_GetMachinePrice();

                queryFormZJ.InStrId       = storeInId;
                queryFormZJ.StartPosition = FormStartPosition.CenterParent;

                queryFormZJ.ShowDialog();

                break;

            case "JY":

                LY_OutSourcePrice queryFormJY = new LY_OutSourcePrice();

                queryFormJY.InStrId = storeInId;

                queryFormJY.StartPosition = FormStartPosition.CenterParent;
                queryFormJY.ShowDialog();

                break;


            default:
                //Console.WriteLine("Default case");
                break;
            }
        }
Example #2
0
        private void 查看入库来源明细ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (average_Cost_ViewDataGridView.CurrentRow == null)
            {
                return;
            }
            string wzbh         = average_Cost_ViewDataGridView.CurrentRow.Cells["物料编码"].Value.ToString();
            string djbh         = average_Cost_ViewDataGridView.CurrentRow.Cells["单据编号"].Value.ToString();
            string machine_Code = average_Cost_ViewDataGridView.CurrentRow.Cells["机器码"].Value.ToString();

            if (string.IsNullOrEmpty(djbh))
            {
                return;
            }
            if (djbh.Length < 2)
            {
                return;
            }
            string Rs = djbh.Substring(0, 2);

            switch (Rs)
            {
            case "CG":

                LY_GetPurchasePrice queryForm = new LY_GetPurchasePrice();
                queryForm.InStr         = djbh;
                queryForm.Code          = wzbh;
                queryForm.StartPosition = FormStartPosition.CenterParent;
                queryForm.ShowDialog();

                break;

            case "GD":

                LY_GetRestructuringPrice queryFormDG = new LY_GetRestructuringPrice();
                queryFormDG.InStr         = djbh;
                queryFormDG.Code          = machine_Code;
                queryFormDG.StartPosition = FormStartPosition.CenterParent;
                queryFormDG.ShowDialog();

                break;

            case "GQ":

                LY_GetRestructuringPrice queryFormQG = new LY_GetRestructuringPrice();
                queryFormQG.InStr         = djbh;
                queryFormQG.Code          = machine_Code;
                queryFormQG.StartPosition = FormStartPosition.CenterParent;
                queryFormQG.ShowDialog();

                break;

            case "DZ":

                LY_GetQzDzPrice queryFormDZ = new LY_GetQzDzPrice();
                queryFormDZ.InStr         = djbh;
                queryFormDZ.Code          = machine_Code;
                queryFormDZ.StartPosition = FormStartPosition.CenterParent;
                queryFormDZ.ShowDialog();

                break;

            case "QZ":

                LY_GetQzDzPrice queryFormQZ = new LY_GetQzDzPrice();
                queryFormQZ.InStr         = djbh;
                queryFormQZ.Code          = machine_Code;
                queryFormQZ.StartPosition = FormStartPosition.CenterParent;
                queryFormQZ.ShowDialog();

                break;

            default:
                //Console.WriteLine("Default case");
                break;
            }
        }