Ejemplo n.º 1
0
        public override void SetAttr(FLOObj O)
        {
            FLOOpe o = (FLOOpe)O;

            this.tb_operationpre.Text   = o.Ope_operationpre;
            this.tb_operation.Text      = o.Ope_operation;
            this.tb_operationsite.Text  = o.Ope_operationsite;
            this.tb_routingpre.Text     = o.Ope_routingpre;
            this.tb_routing.Text        = o.Ope_routing;
            this.nud_operationseq.Value = (decimal)o.Ope_operationseq;
            this.nud_runtime.Value      = (decimal)o.Ope_runtime;
            this.nud_releasefence.Value = (decimal)o.Ope_releasefence;
        }
Ejemplo n.º 2
0
        public override void GetAttrMulti(FLOObj O)
        {
            FLOBuf o = (FLOBuf)O;

            o.Buf_site  = this.tb_site.Text;
            o.Buf_stage = this.tb_stage.Text;
            if (this.ck_sellable.Enabled == true)
            {
                o.Buf_sellable = this.ck_sellable.Checked == true?1:0;
            }
            o.Buf_isresponsebuffer       = this.ck_isresponsebuffer.Checked == true?1:0;
            o.Buf_isproductionplanbuffer = this.ck_isproductionplanbuffer.Checked == true?1:0;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 온컨텍스트 메뉴
        /// </summary>
        /// <param name="e"></param>
        private void OnContextMenu(MouseEventArgs e)
        {
            // Change current selection if necessary
            Point point = new Point(e.X, e.Y);

            int n = Mgr.Flolist.Count;

            FLOObj o = null;

            for (int i = 0; i < n; i++)
            {
                if (Mgr.Flolist[i].Drwobj.HitTest(point))
                {
                    o = mgr.Flolist[i];
                    break;
                }
            }

            if (o != null)
            {
                if (!o.Selected)
                {
                    mgr.Flolist.UnselectAll();
                }

                // Select clicked object
                o.Selected = true;
            }
            else
            {
                mgr.Flolist.UnselectAll();
            }

            Refresh();

            MainMenu mainMenu = owner.Menu;                             // Main menu
            MenuItem editItem = mainMenu.MenuItems[1];                  // Edit submenu

            MenuItem[] items = new MenuItem[editItem.MenuItems.Count];

            for (int i = 0; i < editItem.MenuItems.Count; i++)
            {
                items[i] = editItem.MenuItems[i];
            }

            owner.SetStateOfControls();
            ContextMenu menu = new ContextMenu(items);

            menu.Show(this, point);
            editItem.MergeMenu(menu);
        }
Ejemplo n.º 4
0
        public override void SetAttrMulti(FLOObj O)
        {
            FLOOpe o = (FLOOpe)O;

            if (init)
            {
                this.tb_operationpre.Text   = o.Ope_operationpre;
                this.tb_operation.Text      = o.Ope_operation;
                this.tb_operationsite.Text  = o.Ope_operationsite;
                this.tb_routingpre.Text     = o.Ope_routingpre;
                this.tb_routing.Text        = o.Ope_routing;
                this.nud_operationseq.Value = (decimal)o.Ope_operationseq;
                this.nud_runtime.Value      = (decimal)o.Ope_runtime;
                this.nud_releasefence.Value = (decimal)o.Ope_releasefence;
            }

            init = false;

            if (this.tb_operationpre.Text != o.Ope_operationpre)
            {
                this.tb_operationpre.Text = "";
            }
            if (this.tb_operation.Text != o.Ope_operation)
            {
                this.tb_operation.Text = "";
            }
            if (this.tb_operationsite.Text != o.Ope_operationsite)
            {
                this.tb_operationsite.Text = "";
            }
            if (this.tb_operationpre.Text != o.Ope_routingpre)
            {
                this.tb_operationpre.Text = "";
            }
            if (this.tb_routing.Text != o.Ope_routing)
            {
                this.tb_routing.Text = "";
            }
            if (this.nud_operationseq.Value != (decimal)o.Ope_operationseq)
            {
                this.nud_operationseq.Value = 0;
            }
            if (this.nud_runtime.Value != (decimal)o.Ope_runtime)
            {
                this.nud_runtime.Value = 0;
            }
            if (this.nud_releasefence.Value != (decimal)o.Ope_releasefence)
            {
                this.nud_releasefence.Value = 0;
            }
        }
Ejemplo n.º 5
0
        public override bool CheckFLOLogic(FLOObj s, FLOObj e)
        {
            if (e.Uplist.Count > 0 || e.Dnlist.Count > 0)
            {
                return(false);
            }

            if (e.Cal_caltype != CALTYPE.YIELD &&
                e.Cal_caltype != CALTYPE.EFFICIENCY)
            {
                return(false);
            }

            if (s.Dnlist.Count > 0)
            {
                foreach (FLOObj c in s.Dnlist)
                {
                    if (c.DNlist(0).Cal_caltype == CALTYPE.YIELD && !c.Equals(this))
                    {
                        if (e.Cal_caltype == CALTYPE.YIELD)
                        {
                            return(false);
                        }
                    }
                }
            }

            if (e.Cal_caltype == CALTYPE.EFFICIENCY)
            {
                foreach (FLOObj c in s.Uplist)
                {
                    this.o2c_effresources.Add(c.UPlist(0).Objname);
                }

                foreach (FLOObj c in s.Dnlist)
                {
                    if (c.DNlist(0).Cal_caltype == CALTYPE.EFFICIENCY)
                    {
                        this.o2c_effresources.Remove(c.O2C_effresource);
                    }
                }

                if (this.o2c_effresources.Count < 1)
                {
                    return(false);
                }
            }

            return(true);
        }
Ejemplo n.º 6
0
        public override void SetAttr(FLOObj O)
        {
            FLOC2R o = (FLOC2R)O;

            this.tb_calendarpre.Text  = o.UPlist(0).Cal_calendarpre;
            this.tb_calendar.Text     = o.UPlist(0).Cal_calendar;
            this.tb_calendartype.Text = o.UPlist(0).Cal_caltype.ToString();
            this.tb_resource.Text     = o.DNlist(0).Res_resource;
            this.tb_resourcepre.Text  = o.DNlist(0).Res_resourcepre;
            this.tb_resourcesite.Text = o.DNlist(0).Res_resourcesite;
            this.tb_workcenter.Text   = FLOObj.WORKCENTER;

            this.qtyper = (int)((FLOCal.Cal_Detail)o.UPlist(0).Cal_details[0]).cal_qtyper;
        }
Ejemplo n.º 7
0
        public void AddFLOStt(DrawArea drawArea)
        {
            FLOObj o = this.Flolist.GetFLOSttObj();

            if (o == null)
            {
                o = new FLOStt(drawArea);
                flolist.Add(o);
            }
            else
            {
                o.PopUp(drawArea, new FormFLOStt(drawArea, drawArea.Mgr.Flolist.GetFLOSttObj()));
            }
        }
Ejemplo n.º 8
0
        public override void SetAttr(FLOObj O)
        {
            FLOB2C o = (FLOB2C)O;

            this.tb_calendarpre.Text = o.DNlist(0).Cal_calendarpre;
            this.tb_calendar.Text    = o.DNlist(0).Cal_calendar;
            this.tb_calpattern.Text  = o.DNlist(0).Cal_pattern.ToString();
            this.nud_qtyper.Value    = (decimal)((FLOCal.Cal_Detail)o.DNlist(0).Cal_details[0]).cal_qtyper;

            this.tb_item.Text = o.UPlist(0).Buf_item;
            this.tb_site.Text = o.UPlist(0).Buf_site;

            this.tb_caltype.Text = o.DNlist(0).Cal_caltype.ToString();
        }
Ejemplo n.º 9
0
        public override bool CheckFLOLogic(FLOObj s, FLOObj e)
        {
            if (s.Ope_routing != e.Ope_routing)
            {
                return(false);
            }

            if (s.Ope_operationseq >= e.Ope_operationseq)
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 10
0
        public override void GetAttr(FLOObj O)
        {
            FLOB2O o = (FLOB2O)O;

            o.B2O_cosqty   = (int)this.nud_consqty.Value;
            o.B2O_constype = (FLOObj.BOMTYPE) this.cb_constype.SelectedItem;

            if (this.cb_altbuffer.SelectedItem != null)
            {
                o.B2O_altbuf = this.cb_altbuffer.SelectedItem.ToString();
            }

            o.B2O_altpriority = (int)this.nud_altpriority.Value;
        }
Ejemplo n.º 11
0
 public DRWDmd(FLOObj owner, int x, int y)
 {
     //
     // TODO: 여기에 생성자 논리를 추가합니다.
     //
     this.Owner = owner;
     ltct       = new Point(x - DMDWIDTH / 2, y);
     ctup       = new Point(x - (int)(DMDWIDTH / 4), y - DMDHEIGHT / 2);
     rtup       = new Point(x + DMDWIDTH / 2, y - DMDHEIGHT / 2);
     ctdn       = new Point(x - (int)(DMDWIDTH / 4), y + DMDHEIGHT / 2);
     rtdn       = new Point(x + DMDWIDTH / 2, y + DMDHEIGHT / 2);
     ctct       = new Point(x, y);
     anch       = new Point(x - DMDWIDTH / 2, y - DMDHEIGHT / 2);
 }
Ejemplo n.º 12
0
        public override void GetAttr(FLOObj O)
        {
            FLOB2C o = (FLOB2C)O;

            o.DNlist(0).Cal_calendarpre = this.tb_calendarpre.Text;
            o.DNlist(0).Cal_calendar    = this.tb_calendar.Text;

            if (this.tb_calpattern.Text == FLOObj.CPTTYPE.EVERYDAY.ToString())
            {
                o.DNlist(0).Cal_pattern = FLOObj.CPTTYPE.EVERYDAY;
            }
            if (this.tb_calpattern.Text == FLOObj.CPTTYPE.EVERY_N_DAYS.ToString())
            {
                o.DNlist(0).Cal_pattern = FLOObj.CPTTYPE.EVERY_N_DAYS;
            }
            if (this.tb_calpattern.Text == FLOObj.CPTTYPE.DAYS_OF_WEEK.ToString())
            {
                o.DNlist(0).Cal_pattern = FLOObj.CPTTYPE.DAYS_OF_WEEK;
            }
            if (this.tb_calpattern.Text == FLOObj.CPTTYPE.DAY_OF_YEAR.ToString())
            {
                o.DNlist(0).Cal_pattern = FLOObj.CPTTYPE.DAY_OF_YEAR;
            }
            if (this.tb_calpattern.Text == FLOObj.CPTTYPE.DAY_OF_MONTH.ToString())
            {
                o.DNlist(0).Cal_pattern = FLOObj.CPTTYPE.DAY_OF_MONTH;
            }
            else
            {
                o.DNlist(0).Cal_pattern = FLOObj.CPTTYPE.NULL;
            }


            o.UPlist(0).Buf_item = this.tb_item.Text;
            o.UPlist(0).Buf_site = this.tb_site.Text;

            if (this.tb_caltype.Text == FLOObj.CALTYPE.REP_QTY.ToString())
            {
                o.DNlist(0).Cal_caltype = FLOObj.CALTYPE.REP_QTY;
            }
            if (this.tb_caltype.Text == FLOObj.CALTYPE.MAX_ON_HAND.ToString())
            {
                o.DNlist(0).Cal_caltype = FLOObj.CALTYPE.MAX_ON_HAND;
            }
            if (this.tb_caltype.Text == FLOObj.CALTYPE.MIN_ON_HAND.ToString())
            {
                o.DNlist(0).Cal_caltype = FLOObj.CALTYPE.MIN_ON_HAND;
            }
        }
Ejemplo n.º 13
0
        public void Init()
        {
            sobj = null;
            eobj = null;

            spoint = new Point(0, 0);
            epoint = new Point(0, 0);
            cpoint = new Point(0, 0);

            connecting = false;
            conguiding = false;

            sptype = DRWObj.CONPONT.NULL;
            eptype = DRWObj.CONPONT.NULL;
        }
Ejemplo n.º 14
0
        public override void SetAttr(FLOObj O)
        {
            FLOB2O o = (FLOB2O)O;

            this.tb_bompre.Text            = FLOObj.BMPRE;
            this.tb_bom.Text               = o.RTlist(0).Ope_operation;
            this.tb_bomsite.Text           = o.RTlist(0).Ope_operationsite;
            this.nud_bomseq.Value          = (decimal)o.RTlist(0).Ope_operationseq;
            this.tb_item.Text              = o.LTlist(0).Buf_item;
            this.tb_site.Text              = o.LTlist(0).Buf_site;
            this.nud_consqty.Value         = (decimal)o.B2O_cosqty;
            this.cb_constype.SelectedItem  = o.B2O_constype;
            this.cb_altbuffer.SelectedItem = o.B2O_altbuf;
            this.nud_altpriority.Value     = (decimal)o.B2O_altpriority;
        }
Ejemplo n.º 15
0
        public override void SetAttr(FLOObj O)
        {
            FLODmd o = (FLODmd)O;

            this.tb_sorderid.Text            = o.Dmd_sorderid;
            this.dtp_ordereddate.Value       = Convert.ToDateTime(o.Dmd_ordereddate);
            this.nud_orderqty.Value          = (decimal)o.Dmd_orderqty;
            this.nud_orderprirority.Value    = (decimal)o.Dmd_orderpriority;
            this.nud_latenesstolerance.Value = (decimal)o.Dmd_latenesstolerance;

            if (o.Ltlist.Count > 0)
            {
                this.tb_item.Text = o.LTlist(0).Buf_item;
                this.tb_site.Text = o.LTlist(0).Buf_site;
            }
        }
Ejemplo n.º 16
0
        public void SelModeUp(FLOMgr mgr, MouseEventArgs e)
        {
            if (this.Selmode == GudSrt.SelMode.SelNet)
            {
                mgr.Flolist.SelectByRect(this.selrect);
                this.Selmode = GudSrt.SelMode.SelNon;
                this.Seldraw = false;
            }

            this.selrect = new Rectangle(0, 0, 0, 0);
            this.spoint  = new Point(0, 0);
            this.epoint  = new Point(0, 0);
            this.gridobj = null;

            this.Selmode = GudSrt.SelMode.SelNon;
        }
Ejemplo n.º 17
0
        public override void SetAttr(FLOObj O)
        {
            FLOO2O o = (FLOO2O)O;

            this.tb_routingpre.Text      = o.LTlist(0).Ope_routingpre;
            this.tb_routing.Text         = o.LTlist(0).Ope_routing;
            this.tb_foperationpre.Text   = o.LTlist(0).Ope_operationpre;
            this.tb_foperation.Text      = o.LTlist(0).Ope_operation;
            this.tb_foperationsite.Text  = o.LTlist(0).Ope_operationsite;
            this.nud_foperationseq.Value = (decimal)o.LTlist(0).Ope_operationseq;
            this.tb_toperationpre.Text   = o.RTlist(0).Ope_operationpre;
            this.tb_toperation.Text      = o.RTlist(0).Ope_operation;
            this.tb_toperationsite.Text  = o.RTlist(0).Ope_operationsite;
            this.nud_toperationseq.Value = (decimal)o.RTlist(0).Ope_operationseq;
            this.nud_prodqty.Value       = (decimal)o.O2O_prodqty;
        }
Ejemplo n.º 18
0
        public override bool CheckFLOLogic(FLOObj s, FLOObj e)
        {
            if (e.Uplist.Count > 0 || e.Dnlist.Count > 0)
            {
                return(false);
            }

            if (e.Cal_caltype != CALTYPE.REP_QTY &&
                e.Cal_caltype != CALTYPE.MIN_ON_HAND &&
                e.Cal_caltype != CALTYPE.MAX_ON_HAND)
            {
                return(false);
            }

            if (s.Dnlist.Count > 0)
            {
                foreach (FLOObj c in this.UPlist(0).Dnlist)
                {
                    if (c.DNlist(0).Cal_caltype == CALTYPE.REP_QTY && !c.Equals(this))
                    {
                        if (this.DNlist(0).Cal_caltype == CALTYPE.REP_QTY)
                        {
                            return(false);
                        }
                    }

                    if (c.DNlist(0).Cal_caltype == CALTYPE.MAX_ON_HAND && !c.Equals(this))
                    {
                        if (this.DNlist(0).Cal_caltype == CALTYPE.MAX_ON_HAND)
                        {
                            return(false);
                        }
                    }

                    if (c.DNlist(0).Cal_caltype == CALTYPE.MIN_ON_HAND && !c.Equals(this))
                    {
                        if (this.DNlist(0).Cal_caltype == CALTYPE.MIN_ON_HAND)
                        {
                            return(false);
                        }
                    }
                }
            }

            return(true);
        }
Ejemplo n.º 19
0
        public void SelModeDown(FLOMgr mgr, MouseEventArgs e)
        {
            if (this.Selmode == SelMode.SelNon)
            {
                FLOObj o = mgr.Flolist.GetObjByPoint(new Point(e.X, e.Y));

                if (o != null)
                {
                    if ((Control.ModifierKeys & Keys.Control) == 0 && !o.Selected)
                    {
                        mgr.Flolist.UnselectAll();
                    }

                    this.Selmode = GudSrt.SelMode.SelMov;
                    this.gridobj = o;

                    if ((Control.ModifierKeys & Keys.Control) != 0)
                    {
                        o.Selected   = !o.Selected;
                        this.Selmode = GudSrt.SelMode.SelNon;
                    }
                    else
                    {
                        o.Selected = true;
                    }
                }
            }

            if (this.Selmode == SelMode.SelNon)
            {
                if ((Control.ModifierKeys & Keys.Control) == 0)
                {
                    mgr.Flolist.UnselectAll();
                }

                this.selrect = GetNormilizedRect(spoint, epoint);

                this.Selmode = GudSrt.SelMode.SelNet;

                this.Seldraw = true;
            }

            this.spoint = new Point(e.X, e.Y);
            this.epoint = new Point(e.X, e.Y);
        }
Ejemplo n.º 20
0
        public void ShowConPoint(FLOMgr mgr, int x, int y)
        {
            this.conguiding = false;

            epoint = new Point(x, y);

            FLOObj o = mgr.Flolist.GetObjByConPoint(epoint);

            if (o == null)
            {
                return;
            }

            Point conpoint = o.Drwobj.GetConPoint(o.Drwobj.GetConPointType(epoint));

            cpoint          = conpoint;
            this.conguiding = true;
        }
Ejemplo n.º 21
0
        public void Show(FLOMgr mgr, int x, int y)
        {
            if (this.connecting)
            {
                return;
            }

            spoint = new Point(x, y);
            sobj   = mgr.Flolist.GetObjByPoint(spoint);

            if (sobj != null)
            {
                mgr.Flolist.UnselectAll();
                sptype        = sobj.Drwobj.GetConPointType(spoint);
                spoint        = sobj.Drwobj.GetConPoint(sptype);
                connecting    = true;
                sobj.Selected = true;
            }
        }
Ejemplo n.º 22
0
        private void GetConObjType()
        {
            bool switched = false;

            if (this.sptype == DRWObj.CONPONT.LtCt || this.sptype == DRWObj.CONPONT.CtUp)
            {
                switched = true;
            }

            if (switched)
            {
                FLOObj tmpobj = this.Sobj;
                this.Sobj = this.Eobj;
                this.Eobj = tmpobj;

                DRWObj.CONPONT tmptype = this.sptype;
                this.sptype = this.eptype;
                this.eptype = tmptype;
            }
        }
Ejemplo n.º 23
0
        public override void SetAttr(FLOObj O)
        {
            FLOO2C o = (FLOO2C)O;

            this.tb_operationpre.Text   = o.UPlist(0).Ope_operationpre;
            this.tb_operation.Text      = o.UPlist(0).Ope_operation;
            this.tb_operationsite.Text  = o.UPlist(0).Ope_operationsite;
            this.nud_operationseq.Value = o.UPlist(0).Ope_operationseq;

            this.tb_routingpre.Text = o.UPlist(0).Ope_routingpre;
            this.tb_routing.Text    = o.UPlist(0).Ope_routing;

            this.tb_calendarpre.Text = o.DNlist(0).Cal_calendarpre;
            this.tb_calendar.Text    = o.DNlist(0).Cal_calendar;

            this.tb_caltype.Text             = o.DNlist(0).Cal_caltype.ToString();
            this.cb_effresource.SelectedItem = o.O2C_effresource;

            this.cal_prodqty = (int)((FLOCal.Cal_Detail)o.DNlist(0).Cal_details[0]).cal_qtyper;
        }
Ejemplo n.º 24
0
        public override void SetAttrMulti(FLOObj O)
        {
            FLOBuf o = (FLOBuf)O;

            if (init)
            {
                this.tb_item.Text                      = o.Buf_item;
                this.tb_site.Text                      = o.Buf_site;
                this.tb_stage.Text                     = o.Buf_stage;
                this.ck_sellable.Checked               = o.Buf_sellable == 1?true:false;
                this.ck_isresponsebuffer.Checked       = o.Buf_isresponsebuffer == 1?true:false;
                this.ck_isproductionplanbuffer.Checked = o.Buf_isproductionplanbuffer == 1?true:false;
            }

            init = false;

            if (this.tb_item.Text != o.Buf_item)
            {
                this.tb_item.Text = "";
            }
            if (this.tb_site.Text != o.Buf_site)
            {
                this.tb_site.Text = "";
            }
            if (this.tb_stage.Text != o.Buf_stage)
            {
                this.tb_stage.Text = "";
            }
            if (this.ck_sellable.Checked != (o.Buf_sellable == 1?true:false))
            {
                this.ck_sellable.Checked = false;
            }
            if (this.ck_isresponsebuffer.Checked != (o.Buf_isresponsebuffer == 1?true:false))
            {
                this.ck_isresponsebuffer.Checked = true;
            }
            if (this.ck_isproductionplanbuffer.Checked != (o.Buf_isproductionplanbuffer == 1?true:false))
            {
                ck_isproductionplanbuffer.Checked = true;
            }
        }
Ejemplo n.º 25
0
 public bool AddFLOObj(DrawArea drawArea, FLOObj o)
 {
     if (o != null)
     {
         if (o.Objname != null)
         {
             Flolist.UnselectAll();
             Flolist.Add(o);
             o.Selected = true;
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 26
0
        public FLOB2C(FLOMgr mgr, FLOObj s, FLOObj e, FormFLO f)
        {
            Objtype = OBJTYPE.B2C;
            Init(mgr.Flolist.GetObjSeq(this.Objtype));

            this.Uplist.Clear();
            this.Dnlist.Clear();

            this.Uplist.Insert(0, s);
            this.Dnlist.Insert(0, e);

            if (CheckFLOLogic(this.UPlist(0), this.DNlist(0)))
            {
                if (PopUp(mgr, new FormFLO()))
                {
                    this.Drwobj = new DRWCon(mgr, this);
                    this.UPlist(0).Dnlist.Add(this);
                    this.DNlist(0).Uplist.Add(this);
                }
            }
        }
Ejemplo n.º 27
0
        public DRWCon(Point spt, Point ept, DRWObj.CONPONT stp, DRWObj.CONPONT etp, FLOObj owner)
        {
            this.Owner = owner;
            ltct       = spt;
            rtct       = ept;
            lttp       = stp;
            rttp       = etp;
            ctct       = new Point((int)(ltct.X + rtct.X) / 2, (int)(ltct.Y + rtct.Y) / 2);

            if (Owner.Objtype == (FLOObj.OBJTYPE.B2C | FLOObj.OBJTYPE.O2C | FLOObj.OBJTYPE.R2O))
            {
                this.distype = 2;
            }
            else if (Owner.Objtype == FLOObj.OBJTYPE.C2R)
            {
                this.distype = 3;
            }
            else
            {
                this.distype = 1;
            }
        }
Ejemplo n.º 28
0
        public FLOO2B(FLOMgr mgr, FLOObj s, FLOObj e, FormFLO f)
        {
            Objtype = OBJTYPE.O2B;
            Init(mgr.Flolist.GetObjSeq(this.Objtype));

            this.Ltlist.Clear();
            this.Rtlist.Clear();

            this.Ltlist.Insert(0, s);
            this.Rtlist.Insert(0, e);

            if (CheckFLOLogic(this.LTlist(0), this.RTlist(0)))
            {
                if (PopUp(mgr, new FormFLO()))
                {
                    this.Drwobj = new DRWCon(mgr, this);

                    this.LTlist(0).Rtlist.Add(this);
                    this.RTlist(0).Ltlist.Add(this);
                }
            }
        }
Ejemplo n.º 29
0
        public override void SetAttr(FLOObj O)
        {
            FLOCal o = (FLOCal)O;

            //			this.tb_calendarpre.Text = o.Cal_calendarpre;
            this.tb_calendar.Text        = o.Cal_calendar;
            this.cb_caltype.SelectedItem = o.Cal_caltype;
            this.tb_calendarpre_update();
            this.cb_pattern.SelectedItem   = o.Cal_pattern;
            this.cb_dayofweek.SelectedItem = o.Cal_dayofweek;
            this.nud_numofday.Value        = (decimal)o.Cal_numofday;

            foreach (FLOCal.Cal_Detail detail in o.Cal_details)
            {
                this.lv_details.Items.AddRange(new ListViewItem[] { new ListViewItem(new string[] { detail.cal_detaildx.ToString(), Convert.ToDateTime(detail.cal_effstart).ToShortDateString(), Convert.ToDateTime(detail.cal_effend).ToShortDateString(), detail.cal_qtyper.ToString() }, -1) });
            }

            if (this.lv_details.Items.Count < 1)
            {
                lv_details.Items.AddRange(new ListViewItem[] { new ListViewItem(new string[] { (lv_details.Items.Count + 1).ToString(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortDateString(), "1000" }, -1) });
            }
        }
Ejemplo n.º 30
0
        public override bool CheckFLOLogic(FLOObj s, FLOObj e)
        {
            if (s.Uplist.Count > 0 || s.Dnlist.Count > 0)
            {
                return(false);
            }

            if (s.Cal_caltype != FLOObj.CALTYPE.AVAILABLE_CAPACITY)
            {
                return(false);
            }

            foreach (FLOObj c in e.Uplist)
            {
                if (c.UPlist(0).Cal_caltype == CALTYPE.AVAILABLE_CAPACITY && !c.Equals(this))
                {
                    return(false);
                }
            }

            return(true);
        }