public ProductCirculationForm(CirculationTypeConf c, ProductCirculationDao cirDao) { InitializeComponent(); openMode = 0; circulationID = 0; this.conf = c; //有些控件的显示控制,下面还有一个virtual的hideSomeControls //除了采购销售,要隐藏一些东西 if ((int)conf.type > 4) { this.toolStripButton_print.Visible = false; this.toolStripButton_printLetter.Visible = false; } int close = 0; if (ConfUtility.GetBackFreightOpen() == "backFreightClose") { this.panel_payBackFreight.Visible = false; close++; } if (ConfUtility.GetLastPayReceiptOpen() == "lastPayReceiptClose") { this.panel_lastPayReceipt.Visible = false; close++; } if (close == 2) { this.panel_payBasic.Location = new Point(this.panel_payBasic.Location.X, this.panel_payBasic.Location.Y - 20); } if (ConfUtility.GetPrintLetterOpen() == "printLetterClose") { this.toolStripButton_printLetter.Visible = false; } this.Text = conf.name + "单"; this.label_title.Text = this.Text; //this.label2.Text = conf.business+"时间:"; this.label2.Text = "开单时间:"; this.label_customer.Text = conf.customer; this.label_sum.Text = conf.productDirection == 1 ? "本单实计应付:" : "本单实计应收:"; this.label_thisPayed.Text = conf.productDirection == 1 ? LabelUtility.THIS_PAY : LabelUtility.THIS_RECEIPT; this.label_arrears.Text = conf.arrearsDirection == 1? "以上欠款(应付):":"以上欠款(应收):"; this.label1_accumulative.Text = conf.arrearsDirection == 1 ? "累计欠款(应付):" : "累计欠款(应收):"; this.cirDao = cirDao; initDatagridview(this.dataGridView1); }
public CirSettingForm() { InitializeComponent(); string serialType = ConfUtility.GetSerialType(); //string可以用==,String就不行? if (serialType == "serialType2") { this.radioButton2.Checked = true; } else { this.radioButton1.Checked = true; } string backFreight = ConfUtility.GetBackFreightOpen(); if (backFreight == "backFreightOpen") { this.checkBox_backFreight.Checked = true; } string printLetter = ConfUtility.GetPrintLetterOpen(); if (printLetter == "printLetterOpen") { this.checkBox_printLetter.Checked = true; } string lastPayReceipt = ConfUtility.GetLastPayReceiptOpen(); if (lastPayReceipt == "lastPayReceiptOpen") { this.checkBox_lastPayReceipt.Checked = true; } }