Exemplo n.º 1
0
 /// <summary>
 /// Update a wfrecord.
 /// </summary>
 public void Update(Model.wfrecord wfrecord)
 {
     //
     // todo: add other logic here.
     //
     accessor.Update(wfrecord);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Insert a wfrecord.
 /// </summary>
 public void Insert(Model.wfrecord wfrecord)
 {
     //
     // todo:add other logic here
     //
     accessor.Insert(wfrecord);
 }
Exemplo n.º 3
0
 private void gridView1_Click(object sender, EventArgs e)
 {
     wfr = this.bindingSource1.Current as Model.wfrecord;
     if (wfr != null)
     {
         // string logid = "";
         foreach (Model.wfrecordlog log in ((new BL.wfrecordlogManager()).Select()))
         {
             if (log.wfrecordId == wfr.wfrecordId)
             {
                 if (log.logtype == "添加")
                 {
                     wfrecordid         = wfr.wfrecordId;
                     labelControl6.Text = wfr.wfrecordname;
                     //logid = log.logid;
                 }
             }
         }
     }
 }
Exemplo n.º 4
0
        private void gridControl1_DoubleClick(object sender, EventArgs e)
        {
            //Settings.ProduceManager.Techonlogy.EidtForm f = new Book.UI.Settings.ProduceManager.Techonlogy.EidtForm();
            //if (f.ShowDialog() == DialogResult.OK)
            //{
            //    IList<Model.wfrecord> lis = wfrecordmanage.GetMyexaming(BL.V.ActiveOperator);
            //    this.bindingSource1.DataSource = lis;
            //}
            wfr = this.bindingSource1.Current as Model.wfrecord;
            string logid = "";

            foreach (Model.wfrecordlog log in ((new BL.wfrecordlogManager()).Select()))
            {
                if (log.wfrecordId == wfr.wfrecordId)
                {
                    if (log.logtype == "添加")
                    {
                        wfrecordid         = wfr.wfrecordId;
                        labelControl2.Text = wfr.wfrecordname;
                        logid = log.logid;
                    }
                }
            }

            if (!string.IsNullOrEmpty(logid))
            {
                foreach (Model.TechonlogyHeader h in (new BL.TechonlogyHeaderManager()).Select())
                {
                    if (h.TechonlogyHeaderId == logid)
                    {
                        Settings.ProduceManager.Techonlogy.EidtForm f = new Book.UI.Settings.ProduceManager.Techonlogy.EidtForm(h);
                        if (f.ShowDialog() == DialogResult.OK)
                        {
                            IList <Model.wfrecord> lis = wfrecordmanage.GetMyexaming(BL.V.ActiveOperator, DateTime.Now.Date.AddDays(-14), DateTime.Now.AddDays(1).AddSeconds(-1));
                            this.bindingSource1.DataSource = lis;
                        }
                    }
                }
            }
        }
Exemplo n.º 5
0
 public Model.wfrecord GetNext(Model.wfrecord e)
 {
     return(accessor.GetNext(e));
 }
Exemplo n.º 6
0
 public Model.wfrecord GetPrev(Model.wfrecord e)
 {
     return(accessor.GetPrev(e));
 }
Exemplo n.º 7
0
 public bool HasRowsAfter(Model.wfrecord e)
 {
     return(accessor.HasRowsAfter(e));
 }
Exemplo n.º 8
0
 public bool HasRowsBefore(Model.wfrecord e)
 {
     return(accessor.HasRowsBefore(e));
 }
Exemplo n.º 9
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            #region 注释
            //if (wfr != null)
            //{
            //    //bool percheck = true;
            //    Model.process noprocess = (new BL.ProcessManager()).GetProcessbyid(wfr.nowprocessid);
            //    if (noprocess != null)
            //    {
            //        // checkedListBoxControl1.
            //        if (radioButton1.Checked)
            //        {
            //            wfr.nowprocessid = noprocess.Processnex;
            //            Model.process proc = (new BL.ProcessManager()).GetProcessbyid(wfr.nowprocessid);
            //            if (proc.processType == "結束")
            //            {
            //                wfr.allstate = (int)global::Helper.InvoiceAudit.Audited;
            //                wfr.allovertime = DateTime.Today;
            //            }
            //            (new BL.wfrecordManager()).Update(wfr);
            //            MessageBox.Show("提交成功!");
            //        }
            //        else
            //        {
            //            // wfr.allstate = "未通過審批";
            //            wfr.allovertime = DateTime.Today;
            //            (new BL.wfrecordManager()).Update(wfr);
            //            #region MyRegion

            //            string logid = "";
            //            foreach (Model.wfrecordlog log in ((new BL.wfrecordlogManager()).Select()))
            //            {
            //                if (log.wfrecordId == wfr.wfrecordId)
            //                {
            //                    if (log.logtype == "添加")
            //                    {
            //                        wfrecordid = wfr.wfrecordId;
            //                        labelControl2.Text = wfr.wfrecordname;
            //                        logid = log.logid;
            //                    }
            //                }
            //            }
            //            if (!string.IsNullOrEmpty(logid))
            //            {
            //                foreach (Model.TechonlogyHeader h in (new BL.TechonlogyHeaderManager()).Select())
            //                {
            //                    if (h.TechonlogyHeaderId == logid)
            //                    {
            //                        (new BL.TechonlogyHeaderManager()).Delete(h.TechonlogyHeaderId);
            //                        MessageBox.Show(this.Text, Properties.Resources.SaveSuccess, MessageBoxButtons.OK, MessageBoxIcon.Information);
            //                    }
            //                }
            //                if (!string.IsNullOrEmpty(logid))
            //                {
            //                    foreach (Model.InvoiceXJ h in (new BL.InvoiceXJManager()).Select())
            //                    {
            //                        if (h.InvoiceId == logid)
            //                        {
            //                            (new BL.InvoiceXJManager()).Delete(h.InvoiceId);
            //                            MessageBox.Show(Properties.Resources.SaveSuccess, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
            //                        }
            //                    }
            //                }
            //            }

            //            #endregion
            //        }
            //        IList<Model.wfrecord> lis = wfrecordmanage.GetMyexaming(BL.V.ActiveOperator);
            //        this.bindingSource1.DataSource = lis;
            //        labelControl6.Text = "";
            //    }
            //}
            //else
            //{
            //    MessageBox.Show("請選擇");
            //}
            #endregion
            //GridView view = this.gridView1;
            //GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Cursor.Position));
            //if (hitInfo.InRow && !view.IsGroupRow(hitInfo.RowHandle))
            //{
            if (this.bindingSource1.Current != null)
            {
                wfr = this.bindingSource1.Current as Model.wfrecord;
                // string formname = "Settings.ProduceManager.Techonlogy.EidtForm";//wfr.Workflow.Tables.TableCode;
                string formname = "produceManager.ProduceMaterial.EditForm";
                if (wfr != null)
                {
                    Form f = null;
                    foreach (Form form in this.MdiParent.MdiChildren)
                    {
                        if (form.GetType().FullName.EndsWith(formname))
                        {
                            f = form;
                            break;
                        }
                    }

                    if (f == null)
                    {
                        System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
                        f = (Form)assembly.CreateInstance(string.Format("{0}.{1}", assembly.GetName().Name, formname), false, System.Reflection.BindingFlags.CreateInstance, null, new object[] { wfr.wfrecordname }, null, null);
                    }
                    f.MdiParent = this.MdiParent;
                    f.Show();
                    f.BringToFront();
                }
            }
        }
Exemplo n.º 10
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            //GridView view = sender as GridView;
            //GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Cursor.Position));
            //if (hitInfo.InRow && !view.IsGroupRow(hitInfo.RowHandle))
            //{
            if (this.bindingSource1.Current != null)
            {
                wfr = this.bindingSource1.Current as Model.wfrecord;
                // string formname = "Settings.ProduceManager.Techonlogy.EidtForm";//wfr.Workflow.Tables.TableCode;
                string formname = "produceManager.ProduceMaterial.EditForm";
                if (wfr != null)
                {
                    Form f = null;
                    foreach (Form form in this.MdiParent.MdiChildren)
                    {
                        if (form.GetType().FullName.EndsWith(formname))
                        {
                            f = form;
                            break;
                        }
                    }

                    if (f == null)
                    {
                        System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
                        f = (Form)assembly.CreateInstance(string.Format("{0}.{1}", assembly.GetName().Name, formname), false, System.Reflection.BindingFlags.CreateInstance, null, new object[] { wfr.wfrecordname }, null, null);
                    }

                    f.MdiParent = this.MdiParent;
                    f.Show();
                    f.BringToFront();
                    #region Note
                    //wfr.Workflow.Tables.TableCode
                    //    string logid = "";
                    //    foreach (Model.wfrecordlog log in ((new BL.wfrecordlogManager()).Select()))
                    //    {
                    //        if (log.wfrecordId == wfr.wfrecordId)
                    //        {
                    //            if (log.logtype == "添加")
                    //            {
                    //                wfrecordid = wfr.wfrecordId;
                    //                labelControl6.Text = wfr.wfrecordname;
                    //                logid = log.logid;
                    //            }
                    //        }
                    //    }
                    //    if (!string.IsNullOrEmpty(logid))
                    //    {
                    //        foreach (Model.TechonlogyHeader h in (new BL.TechonlogyHeaderManager()).Select())
                    //        {
                    //            if (h.TechonlogyHeaderId == logid)
                    //            {
                    //                Settings.ProduceManager.Techonlogy.EidtForm f = new Book.UI.Settings.ProduceManager.Techonlogy.EidtForm(h);
                    //                if (f.ShowDialog() == DialogResult.OK)
                    //                {
                    //                    IList<Model.wfrecord> lis = wfrecordmanage.GetMyexaming(BL.V.ActiveOperator);
                    //                    this.bindingSource1.DataSource = lis;
                    //                }
                    //            }
                    //        }
                    //        foreach (Model.InvoiceXJ h in new BL.InvoiceXJManager().Select())
                    //        {
                    //            if (h.InvoiceId == logid)
                    //            {
                    //                Invoices.XJ.EditForm f = new Invoices.XJ.EditForm(h);
                    //                f.Show();
                    //                //if (f.ShowDialog() == DialogResult.OK)
                    //                //{
                    //                //    IList<Model.wfrecord> lis = wfrecordmanage.GetMyexaming(BL.V.ActiveOperator);
                    //                //    this.bindingSource1.DataSource = lis;

                    //                //}
                    //            }
                    //        }
                    //    }
                    #endregion
                }
            }
        }