Exemplo n.º 1
0
        public override void GetAttr(FLOObj O)
        {
            FLOO2B o = (FLOO2B)O;

            o.O2B_prodqty       = (int)this.nud_prodqty.Value;
            o.O2B_altpriority   = (int)this.nud_altpriority.Value;
            o.O2B_altproportion = (int)this.nud_altproportion.Value;
            o.O2B_basedqty      = this.ck_basedqty.Checked == true?1:0;
            o.O2B_cobyprod      = this.ck_cobyprod.Checked == true?1:0;
            o.O2B_cobyprodqty   = (int)this.nud_cobyprodqty.Value;
            o.O2B_cobyprodrate  = (int)this.nud_cobyprodrate.Value;
        }
Exemplo n.º 2
0
        public override void SetAttr(FLOObj O)
        {
            FLOO2B o = (FLOO2B)O;

            this.tb_bompre.Text  = FLOObj.BMPRE;
            this.tb_bom.Text     = o.LTlist(0).Ope_operation;
            this.tb_bomsite.Text = o.LTlist(0).Ope_operationsite;

            this.tb_prodtype.Text        = o.O2B_prodtype.ToString();
            this.nud_prodqty.Value       = (decimal)o.O2B_prodqty;
            this.rb_priority.Checked     = o.O2B_altpriority > 0?true:false;
            this.rb_proportion.Checked   = o.O2B_altproportion > 0?true:false;
            this.nud_altpriority.Value   = (decimal)o.O2B_altpriority;
            this.nud_altproportion.Value = (decimal)o.O2B_altproportion;
            this.ck_basedqty.Checked     = o.O2B_basedqty == 1?true:false;
            this.ck_cobyprod.Checked     = o.O2B_cobyprod == 1?true:false;
            this.nud_cobyprodqty.Value   = (decimal)o.O2B_cobyprodqty;
            this.nud_cobyprodrate.Value  = (decimal)o.O2B_cobyprodrate;

            this.buf_item = o.RTlist(0).Buf_item;
            this.buf_site = o.RTlist(0).Buf_site;
        }
Exemplo n.º 3
0
        public override void GetAttrMulti(FLOObj O)
        {
            FLOO2B o = (FLOO2B)O;

            if (this.nud_prodqty.Enabled)
            {
                o.O2B_prodqty = (int)this.nud_prodqty.Value;
            }

            if (this.rb_priority.Enabled && this.rb_priority.Checked)
            {
                o.O2B_altpriority   = (int)this.nud_altpriority.Value;
                o.O2B_altproportion = 0;
            }
            if (this.rb_proportion.Enabled && this.rb_proportion.Checked)
            {
                o.R2O_altpriority   = 0;
                o.O2B_altproportion = (int)this.nud_altproportion.Value;
            }

            if (this.ck_basedqty.Enabled && this.ck_basedqty.Checked)
            {
                o.O2B_basedqty     = this.ck_basedqty.Checked == true?1:0;
                o.O2B_cobyprodqty  = (int)this.nud_cobyprodqty.Value;
                o.O2B_cobyprod     = this.ck_cobyprod.Checked == true?1:0;
                o.O2B_cobyprodrate = 0;
            }

            if (this.ck_basedqty.Enabled && !this.ck_basedqty.Checked)
            {
                o.O2B_cobyprodrate = (int)this.nud_cobyprodrate.Value;
                o.O2B_basedqty     = this.ck_basedqty.Checked == true?1:0;
                o.O2B_cobyprod     = this.ck_cobyprod.Checked == true?1:0;
                o.O2B_cobyprodqty  = 0;
            }
        }
Exemplo n.º 4
0
        public override void SetAttrMulti(FLOObj O)
        {
            FLOO2B o = (FLOO2B)O;

            if (init)
            {
                this.buf_item = o.RTlist(0).Buf_item;
                this.buf_site = o.RTlist(0).Buf_site;

                this.tb_bompre.Text   = FLOObj.BMPRE;
                this.tb_bom.Text      = o.LTlist(0).Ope_operation;
                this.tb_bomsite.Text  = o.LTlist(0).Ope_operationsite;
                this.tb_prodtype.Text = o.O2B_prodtype.ToString();

                this.nud_prodqty.Value       = (decimal)o.O2B_prodqty;
                this.nud_altpriority.Value   = (decimal)o.O2B_altpriority;
                this.nud_altproportion.Value = (decimal)o.O2B_altproportion;
                this.nud_cobyprodqty.Value   = (decimal)o.O2B_cobyprodqty;
                this.nud_cobyprodrate.Value  = (decimal)o.O2B_cobyprodrate;

                this.rb_priority.Checked   = o.O2B_altpriority > 0?true:false;
                this.rb_proportion.Checked = o.O2B_altproportion > 0?true:false;
                this.ck_basedqty.Checked   = o.O2B_basedqty == 1?true:false;
                this.ck_cobyprod.Checked   = o.O2B_cobyprod == 1?true:false;
            }

            init = false;

            if (this.tb_bom.Text != o.RTlist(0).Ope_operation)
            {
                this.tb_bom.Text = "";
            }
            if (this.tb_bomsite.Text != o.RTlist(0).Ope_operationsite)
            {
                this.tb_bomsite.Text = "";
            }
            if (this.tb_prodtype.Text != o.O2B_prodtype.ToString())
            {
                this.tb_prodtype.Text    = FLOObj.OPETYPE.NULL.ToString();
                this.nud_prodqty.Enabled = true;
            }
            if (this.nud_prodqty.Value != (decimal)o.O2B_prodqty)
            {
                this.nud_prodqty.Value = 0;
            }
            if (this.nud_altpriority.Value != (decimal)o.O2B_altpriority)
            {
                this.nud_altpriority.Value = 0;
            }
            if (this.nud_altproportion.Value != (decimal)o.O2B_altproportion)
            {
                this.nud_altproportion.Value = 0;
            }
            if (this.nud_cobyprodqty.Value != (decimal)o.O2B_cobyprodqty)
            {
                this.nud_cobyprodqty.Value = 0;
            }
            if (this.nud_cobyprodrate.Value != (decimal)o.O2B_cobyprodrate)
            {
                this.nud_cobyprodrate.Value = 0;
            }
            if (this.rb_priority.Checked != (o.O2B_altpriority > 0?true:false))
            {
                this.rb_priority.Checked = true;
            }
            if (this.rb_proportion.Checked != (o.O2B_altproportion > 0?true:false))
            {
                this.rb_proportion.Checked = false;
            }
            if (this.ck_basedqty.Checked != (o.O2B_basedqty == 1?true:false))
            {
                this.ck_basedqty.Checked = true;
            }
            if (this.ck_cobyprod.Checked != (o.O2B_cobyprod == 1?true:false))
            {
                this.ck_cobyprod.Checked = true;
            }
        }