Exemplo n.º 1
0
        private void FormCURelRecord_Load(object sender, EventArgs e)
        {
            formCustomerCourse = (FormCustomerCourse)this.Owner;
            commUse.BindComboBox(cbxCustomerCode, "CustomerCode", "CustomerName", "select CustomerCode,CustomerName from BSCustomer", "BSCustomer");
            commUse.BindComboBox(cbxRelManner, "Code", "Name", "select Code,Name from INRelManner", "INRelManner");
            cbxCustomerCode.SelectedValue = formCustomerCourse.tvCustomer.SelectedNode.Tag;

            //添加操作
            if (this.Tag.ToString() == "Add")
            {
                cbxRelManner.SelectedIndex = -1;
                dtpRelDate.Value           = DateTime.Today;
                dtpNextDate.Value          = DateTime.Today;
            }

            //修改操作
            if (this.Tag.ToString() == "Edit")
            {
                dtpRelDate.Value           = Convert.ToDateTime(formCustomerCourse.dgvRel["RelDate", formCustomerCourse.dgvRel.CurrentRow.Index].Value);
                cbxRelManner.SelectedValue = formCustomerCourse.dgvRel["RelManner", formCustomerCourse.dgvRel.CurrentRow.Index].Value;
                txtLinkman.Text            = formCustomerCourse.dgvRel["Linkman_Rel", formCustomerCourse.dgvRel.CurrentRow.Index].Value.ToString();
                txtTelephoneCode.Text      = formCustomerCourse.dgvRel["TelephoneCode_Rel", formCustomerCourse.dgvRel.CurrentRow.Index].Value.ToString();
                dtpNextDate.Value          = Convert.ToDateTime(formCustomerCourse.dgvRel["NextDate", formCustomerCourse.dgvRel.CurrentRow.Index].Value);
                rtbRelContent.Text         = formCustomerCourse.dgvRel["RelContent", formCustomerCourse.dgvRel.CurrentRow.Index].Value.ToString();
                rtbFeeInfo.Text            = formCustomerCourse.dgvRel["FeeInfo", formCustomerCourse.dgvRel.CurrentRow.Index].Value.ToString();
            }
        }
Exemplo n.º 2
0
        private void FormCUSellChance_Load(object sender, EventArgs e)
        {
            formCustomerCourse = (FormCustomerCourse)this.Owner;
            commUse.BindComboBox(cbxCustomerCode, "CustomerCode", "CustomerName", "select CustomerCode,CustomerName from BSCustomer", "BSCustomer");
            commUse.BindComboBox(cbxChanceCode, "ChanceCode", "ChanceName", "select ChanceCode,ChanceName from CUChance", "CUChance");
            commUse.BindComboBox(cbxInvenCode, "InvenCode", "InvenName", "select InvenCode,InvenName from BSInven", "BSInven");
            cbxCustomerCode.SelectedValue = formCustomerCourse.tvCustomer.SelectedNode.Tag;

            if (this.Tag.ToString() == "Add") //添加操作
            {
                cbxChanceCode.SelectedIndex = -1;
                cbxInvenCode.SelectedIndex  = -1;
                dtpRegDate.Value            = DateTime.Today;
                dtpForeDate.Value           = DateTime.Today;
            }

            if (this.Tag.ToString() == "Edit") //编辑操作
            {
                txtTheme.Text               = formCustomerCourse.dgvSell["Theme", formCustomerCourse.dgvSell.CurrentRow.Index].Value.ToString();
                dtpRegDate.Value            = Convert.ToDateTime(formCustomerCourse.dgvSell["RegDate", formCustomerCourse.dgvSell.CurrentRow.Index].Value);
                cbxChanceCode.SelectedValue = formCustomerCourse.dgvSell["ChanceCode", formCustomerCourse.dgvSell.CurrentRow.Index].Value;
                dtpForeDate.Value           = Convert.ToDateTime(formCustomerCourse.dgvSell["ForeDate", formCustomerCourse.dgvSell.CurrentRow.Index].Value);
                cbxInvenCode.SelectedValue  = formCustomerCourse.dgvSell["InvenCode", formCustomerCourse.dgvSell.CurrentRow.Index].Value;
                txtUnitPrice.Text           = formCustomerCourse.dgvSell["UnitPrice", formCustomerCourse.dgvSell.CurrentRow.Index].Value.ToString();
                txtQuantity.Text            = formCustomerCourse.dgvSell["Quantity", formCustomerCourse.dgvSell.CurrentRow.Index].Value.ToString();
                txtCUMoney.Text             = formCustomerCourse.dgvSell["CUMoney", formCustomerCourse.dgvSell.CurrentRow.Index].Value.ToString();
                rtbRemark.Text              = formCustomerCourse.dgvSell["Remark", formCustomerCourse.dgvSell.CurrentRow.Index].Value.ToString();
            }
        }
Exemplo n.º 3
0
        private void FormCUAfterService_Load(object sender, EventArgs e)
        {
            formCustomerCourse = (FormCustomerCourse)this.Owner;
            commUse.BindComboBox(cbxCustomerCode, "CustomerCode", "CustomerName", "select CustomerCode,CustomerName from BSCustomer", "BSCustomer");
            commUse.BindComboBox(cbxEmployeeCode, "EmployeeCode", "EmployeeName", "select EmployeeCode,EmployeeName from BSEmployee", "BSEmployee");
            cbxCustomerCode.SelectedValue = formCustomerCourse.tvCustomer.SelectedNode.Tag;

            if (this.Tag.ToString() == "Add") //添加操作
            {
                cbxEmployeeCode.SelectedIndex = -1;
                dtpSerDate.Value = DateTime.Today;
            }

            if (this.Tag.ToString() == "Edit") //修改操作
            {
                dtpSerDate.Value = Convert.ToDateTime(formCustomerCourse.dgvAfter["SerDate", formCustomerCourse.dgvAfter.CurrentRow.Index].Value);
                cbxEmployeeCode.SelectedValue = formCustomerCourse.dgvAfter["EmployeeCode", formCustomerCourse.dgvAfter.CurrentRow.Index].Value;
                txtLinkman.Text       = formCustomerCourse.dgvAfter["Linkman_After", formCustomerCourse.dgvAfter.CurrentRow.Index].Value.ToString();
                txtTelephoneCode.Text = formCustomerCourse.dgvAfter["TelephoneCode_After", formCustomerCourse.dgvAfter.CurrentRow.Index].Value.ToString();
                txtSerDays.Text       = formCustomerCourse.dgvAfter["SerDays", formCustomerCourse.dgvAfter.CurrentRow.Index].Value.ToString();
                rtbSerContent.Text    = formCustomerCourse.dgvAfter["SerContent", formCustomerCourse.dgvAfter.CurrentRow.Index].Value.ToString();
                rtbResolvent.Text     = formCustomerCourse.dgvAfter["Resolvent", formCustomerCourse.dgvAfter.CurrentRow.Index].Value.ToString();
            }
        }