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; }
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; } }