Esempio n. 1
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            //string guid = gridView1.GetFocusedRowCellValue("guid").ToString();
            //FmWODetail frm = new FmWODetail(guid);
            //frm.ShowDialog();

            #region 修改工序
            if (dal.ExistRef(model.Guid))
            {
                throw new Exception("已经生成流转卡,不能修改!");
            }

            FmWORouter frm = new FmWORouter(model.Guid);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                gridControl3.DataSource = dal.GetRouter(model.Guid);
            }
            #endregion
        }
Esempio n. 2
0
        private void Btn_Delete_Click(object sender, EventArgs e)
        {
            #region  除指令单
            if (MsgBox.ShowYesNoMsg("即将删除当前生产订单行对应的所有指令单,是否继续!") != DialogResult.Yes)
            {
                return;
            }

            int modid = Convert.ToInt32(gridView1.GetFocusedDataRow()["modid"]);
            var wodal = new WorkOrderDAL();

            if (wodal.ExistRef(modid))
            {
                throw new Exception("生产订单对应的指令单已经生成流转卡不能删除!");
            }

            if (wodal.Delete(modid))
            {
                this.LoadDetails(modid);
            }

            #endregion
        }