Exemplo n.º 1
0
        private void Frm_RegisterPay_Load(object sender, EventArgs e)
        {
            string s_rc130 = string.Empty;

            rc001 = this.swapdata["RC001"].ToString();

            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + rc001 + "'");

            while (reader.Read())
            {
                txtEdit_rc001.Text      = rc001;
                txtEdit_rc109.EditValue = reader["RC109"];
                txtEdit_rc003.EditValue = reader["RC003"];
                txtEdit_rc303.EditValue = reader["RC303"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                be_position.Text        = RegisterAction.GetRegPathName(rc001);

                s_rc130  = reader["RC130"].ToString();
                bitprice = Convert.ToDecimal(SqlAssist.ExecuteScalar("select bi009 from bi01 where bi001='" + s_rc130 + "'", null));
                txtedit_price.EditValue = bitprice;

                //如果最后缴费日期 大于 2018-01-01 则无需混合价格
                if (string.Compare(Convert.ToDateTime(reader["RC150"]).ToString("yyyyMMdd"), "20180101") > 0)
                {
                    checkEdit1.Enabled = false;
                }
                else
                {
                    oldprice = RegisterAction.GetLastRegPrice(rc001);
                }
            }
            reader.Dispose();

            rc04Adapter.SelectCommand.CommandText = "select * from v_rc04 where rc001='" + rc001 + "' order by rc020";
            rc04Adapter.Fill(dt_rc04);
            gridControl1.DataSource = dt_rc04;

            fpAdapter.Fill(dt_fpsource);
            lookup_sa004.DataSource    = dt_fpsource;
            lookup_sa004.DisplayMember = "ITEM_TEXT";
            lookup_sa004.ValueMember   = "ITEM_ID";

            sa01Adapter.Fill(dt_sa01);
            gridControl2.DataSource = dt_sa01;

            //comboBox1.Text = "";
            this.Calc_Hj(12);
        }