本文整理汇总了C#中HXCPcClient.Chooser.frmCustomerInfo.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# frmCustomerInfo.ShowDialog方法的具体用法?C# frmCustomerInfo.ShowDialog怎么用?C# frmCustomerInfo.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HXCPcClient.Chooser.frmCustomerInfo
的用法示例。
在下文中一共展示了frmCustomerInfo.ShowDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitQueryControlDataSource
private void InitQueryControlDataSource() //初始化查询控件数据项
{
if ((fld_vehicle_no.ValueControl as ExtTextChooser) != null)
{
(fld_vehicle_no.ValueControl as ExtTextChooser).ChooserClick += delegate //车牌号
{
var vechicleChooser = new frmVehicleGrade();
var result = vechicleChooser.ShowDialog();
if (result != DialogResult.OK) return;
fld_vehicle_no.Value = fld_vehicle_no.DisplayValue = vechicleChooser.strLicensePlate;
};
}
if ((fld_customer_code.ValueControl as ExtTextChooser) != null)
{
(fld_customer_code.ValueControl as ExtTextChooser).ChooserClick += delegate //客户编码(同时会更新客户名称)
{
var custChooser = new frmCustomerInfo();
var result = custChooser.ShowDialog();
if (result != DialogResult.OK) return;
fld_customer_code.DisplayValue = custChooser.strCustomerNo;
fld_customer_code.Value = custChooser.strCustomerName;
};
}
fld_info_status.ContentTypeName = fld_info_status_yt.ContentTypeName = fld_receipt_type.ContentTypeName = "DbDic";
fld_info_status.ContentTypeParameter = "sys_service_info_status";//单据状态
fld_info_status_yt.ContentTypeParameter = "review_status_name_yt";//宇通单据状态
fld_receipt_type.ContentTypeParameter = "bill_type_yt"; //单据类型
}
示例2: txtcPickingPeople_ChooserClick
private void txtcPickingPeople_ChooserClick(object sender, EventArgs e)
{
frmCustomerInfo customerInfo = new frmCustomerInfo();
if (customerInfo.ShowDialog() == DialogResult.OK)
{
txtcPickingPeople.Text = customerInfo.strCustomerName;
}
}
示例3: txtcCust_code_ChooserClick
//客户选择
private void txtcCust_code_ChooserClick(object sender, EventArgs e)
{
frmCustomerInfo frmCust = new frmCustomerInfo();
if (frmCust.ShowDialog() == DialogResult.OK)
{
txtcCust_code.Text = frmCust.strCustomerNo;
txtCust_name.Caption = frmCust.strCustomerName;
}
}
示例4: txtcCustName1_ChooserClick
//往来单位1选择器
private void txtcCustName1_ChooserClick(object sender, EventArgs e)
{
if (cboOrderType.SelectedValue == null)
{
return;
}
DataSources.EnumAccountVerification enumAccount = (DataSources.EnumAccountVerification)Convert.ToInt32(cboOrderType.SelectedValue);
switch (enumAccount)
{
case DataSources.EnumAccountVerification.YuShouToYingShou://预收冲应收
case DataSources.EnumAccountVerification.YingShouToYingShou://应收转应收
case DataSources.EnumAccountVerification.YingShouToYingFu://应收冲应付
case DataSources.EnumAccountVerification.YuShouToYuShou://预收转预收
frmCustomerInfo frmCustomer = new frmCustomerInfo();
if (frmCustomer.ShowDialog() == DialogResult.OK)
{
txtcCustName1.Tag = frmCustomer.strCustomerId;
cust_code1 = frmCustomer.strCustomerNo;
txtcCustName1.Text = frmCustomer.strCustomerName;
if (txtcCustName2.Tag == null && enumAccount != DataSources.EnumAccountVerification.YingShouToYingFu)//没有选择应收客户,默认选择与预收客户相同
{
txtcCustName2.Tag = frmCustomer.strCustomerId;
cust_code2 = frmCustomer.strCustomerNo;
txtcCustName2.Text = frmCustomer.strCustomerName;
}
if (txtAdvanceBalance.Visible)
{
txtAdvanceBalance.Caption = DBOperation.WaiLaiYuE(frmCustomer.strCustomerId, DataSources.EnumOrderType.RECEIVABLE).ToString();
}
}
break;
case DataSources.EnumAccountVerification.YuFuToYingFu://预付冲应付
case DataSources.EnumAccountVerification.YingFuToYingFu://应付转应付
case DataSources.EnumAccountVerification.YingFuToYingShou://应付冲应收
case DataSources.EnumAccountVerification.YuFuToYuFu://预付转预付
frmSupplier frmSupp = new frmSupplier();
if (frmSupp.ShowDialog() == DialogResult.OK)
{
txtcCustName1.Tag = frmSupp.supperID;
cust_code1 = frmSupp.supperCode;
txtcCustName1.Text = frmSupp.supperName;
if (txtcCustName2.Tag == null && enumAccount != DataSources.EnumAccountVerification.YingFuToYingShou)
{
txtcCustName2.Tag = frmSupp.supperID;
cust_code2 = frmSupp.supperCode;
txtcCustName2.Text = frmSupp.supperName;
}
if (txtAdvanceBalance.Visible)
{
txtAdvanceBalance.Caption = DBOperation.WaiLaiYuE(frmSupp.supperID, DataSources.EnumOrderType.PAYMENT).ToString();
}
}
break;
}
}
示例5: txtcCustName2_ChooserClick
//往来单位2选择器
private void txtcCustName2_ChooserClick(object sender, EventArgs e)
{
if (cboOrderType.SelectedValue == null)
{
return;
}
DataSources.EnumAccountVerification enumAccount = (DataSources.EnumAccountVerification)Convert.ToInt32(cboOrderType.SelectedValue);
switch (enumAccount)
{
case DataSources.EnumAccountVerification.YuShouToYingShou://预收冲应收
case DataSources.EnumAccountVerification.YingShouToYingShou://应收转应收
case DataSources.EnumAccountVerification.YingFuToYingShou://应付冲应收
case DataSources.EnumAccountVerification.YuShouToYuShou://预收转预收
frmCustomerInfo frmCustomer = new frmCustomerInfo();
if (frmCustomer.ShowDialog() == DialogResult.OK)
{
txtcCustName2.Tag = frmCustomer.strCustomerId;
cust_code2 = frmCustomer.strCustomerNo;
txtcCustName2.Text = frmCustomer.strCustomerName;
}
break;
case DataSources.EnumAccountVerification.YuFuToYingFu://预付冲应付
case DataSources.EnumAccountVerification.YingFuToYingFu://应付转应付
case DataSources.EnumAccountVerification.YingShouToYingFu://应收冲应付
case DataSources.EnumAccountVerification.YuFuToYuFu://预付转预付
frmSupplier frmSupp = new frmSupplier();
if (frmSupp.ShowDialog() == DialogResult.OK)
{
txtcCustName2.Tag = frmSupp.supperID;
cust_code2 = frmSupp.supperCode;
txtcCustName2.Text = frmSupp.supperName;
}
break;
}
}
示例6: InitControlDataSource
private void InitControlDataSource() //初始化数据字段控件数据
{
try
{
#region 设置控件验证值
txt_repairer_mobile.VerifyTypeName = txt_link_man_mobile.VerifyTypeName = "Phone";
txt_repairer_mobile.ShowError = txt_link_man_mobile.ShowError = true;
txt_customer_postcode.VerifyTypeName = "Postcode";
txt_customer_postcode.ShowError = true;
txt_feedback_num.VerifyTypeName = "Integer";
txt_feedback_num.ShowError = true;
txt_other_money.VerifyTypeName = txt_man_hour_subsidy.VerifyTypeName = txt_ccf.VerifyTypeName = txt_journey_subsidy.VerifyTypeName = txt_maintain_mileage.VerifyTypeName = txt_travel_mileage.VerifyTypeName = "UFloat";
txt_other_money.ShowError = txt_man_hour_subsidy.ShowError = txt_ccf.ShowError = txt_journey_subsidy.ShowError = txt_maintain_mileage.ShowError = txt_travel_mileage.ShowError = true;
#endregion
dtp_goout_back_time.Value = dtp_goout_time.Value = dtp_maintain_time.Value = dtp_parts_buy_time.Value = dtp_repairs_time.Value = dtp_start_work_time.Value = dtp_complete_work_time.Value = DBHelper.GetCurrentTime();
dgv_tb_maintain_three_guaranty_accessory.TableName = "tb_maintain_three_guaranty";
dgv_tb_maintain_three_guaranty_accessory.TableNameKeyValue = TgId;
#region 基础数据
var isSecondStation = DBHelper.GetSingleValue("根据公司编码获取是否为二级站", GlobalStaticObj.CommAccCode, "tb_company", "category", "sap_code = '" + GlobalStaticObj.ServerStationCode+ "'", "");
if (!String.IsNullOrEmpty(isSecondStation))
{
chk_whether_second_station_true.Checked = isSecondStation == "1"; //一级站
chk_whether_second_station_false.Checked = isSecondStation == "2"; //二级站
}
txt_service_station_code.Text = GlobalStaticObj.ServerStationCode; //当前服务站代码
txt_service_station_name.Caption = GlobalStaticObj.ServerStationName; //当前服务站名称
dtp_repairs_time.Value = DateTime.Now; //报修日期(系统默认当前时间)
//txt_service_station_code.ChooserClick += delegate //服务站选择器
//{
// var signInfoChooser = new FormSignInfoChooser();
// var result = signInfoChooser.ShowDialog();
// if (result != DialogResult.OK) return;
// txt_service_station_code.Text = signInfoChooser.SignCode;
// txt_service_station_code.Tag = signInfoChooser.SignId;
// txt_service_station_name.Caption = signInfoChooser.SignName;
//};
CommonCtrl.CmbBindDict(cbo_receipt_type, "bill_type_yt", false); //宇通单据类型
CommonCtrl.CmbBindDict(cbo_cost_type_service_zczg, "cost_type_care_policy_yt", false); //费用类型(政策照顾)
CommonCtrl.BindComboBoxByTable(cbo_product_notice_no, "tb_product_no", "service_code", "activities", false); //产品改进通知
CommonCtrl.CmbBindDict(cbo_whether_go_out, "sys_true_false", false); //是否外出
cbo_whether_go_out.SelectedValue = DbDic2Enum.FALSE; //是否外出(默认选择为否)
CommonCtrl.CmbBindDict(cbo_refit_case, "refit_case", false); //改装情况
cbo_refit_case.SelectedValue = DbDic2Enum.REFIT_CASE_FALSE; //改装请款(默认选择为无改装)
DataSources.BindComBoxDataEnum(cbo_promise_guarantee, typeof(DataSources.EnumYesNo), false); //特殊约定质保
cbo_promise_guarantee.SelectedValue = DataSources.EnumYesNo.NO; //特殊约定质保(默认选择为否)
UIAssistants.BindingServiceStationUser(cbo_approver_name_yt, true, "请选择");
txt_appraiser_name.ChooserClick += delegate //鉴定人选择器
{
var chooser = new frmUsers{ cbo_data_source = { SelectedValue = "1", Enabled = false } };
var result = chooser.ShowDialog();
if (result != DialogResult.OK) return;
if (String.IsNullOrEmpty(chooser.User_Name) || String.IsNullOrEmpty(chooser.CrmId))
{
MessageBoxEx.Show("无效的数据,获取不到用户的CRM信息");
return;
}
//txt_approver_name_yt.Text = chooser.contName;
//txt_approver_name_yt.Tag = chooser.crmId;
txt_appraiser_name.Text = chooser.User_Name;
txt_appraiser_name.Tag = chooser.CrmId;
};
txt_repair_man.ChooserClick += delegate //维修人选择器
{
var chooser = new frmUsers{ cbo_data_source = { SelectedValue = "1", Enabled = false } };
var result = chooser.ShowDialog();
if (result != DialogResult.OK) return;
if (String.IsNullOrEmpty(chooser.User_Name) || String.IsNullOrEmpty(chooser.CrmId))
{
MessageBoxEx.Show("无效的数据,获取不到用户的CRM信息");
return;
}
//txt_approver_name_yt.Text = chooser.contName;
//txt_approver_name_yt.Tag = chooser.crmId;
txt_repair_man.Text = chooser.User_Name;
txt_repair_man.Tag = chooser.CrmId;
};
CommonCtrl.BindComboBoxByTable(cbo_cost_type_service_fwhd, "tb_product_no", "service_code", "activities", false); //费用类型(服务活动) unknow
CommonCtrl.CmbBindDict(cbo_customer_property, "custom_property_yt", false); //客户性质
txt_vehicle_use_corp.ChooserClick += delegate //车辆使用单位选择器
{
var custChooser = new frmCustomerInfo();
var result = custChooser.ShowDialog();
if (result == DialogResult.OK)
{
if (String.IsNullOrEmpty(custChooser.CustomerInfo.CustName) || String.IsNullOrEmpty(custChooser.CustomerInfo.SAPCode))
{
MessageBoxEx.Show("选择的数据不符合使用要求");
return;
//.........这里部分代码省略.........
示例7: InitQueryControlDataSource
private void InitQueryControlDataSource() //初始化查询控件数据项
{
txt_vehicle_no.ChooserClick += delegate //车牌号
{
try
{
var vechicleChooser = new frmVehicleGrade();
var result = vechicleChooser.ShowDialog();
if (result != DialogResult.OK) return;
txt_vehicle_no.Text = vechicleChooser.strLicensePlate;
}
catch (Exception ex)
{
_loggingService.WriteLog(ex);
}
};
txt_customer_code.ChooserClick += delegate //客户编码(同时会更新客户名称)
{
try
{
var custChooser = new frmCustomerInfo();
var result = custChooser.ShowDialog();
if (result != DialogResult.OK) return;
txt_customer_code.Text = custChooser.strCustomerNo;
txt_customer_name.Caption = custChooser.strCustomerName;
}
catch (Exception ex)
{
_loggingService.WriteLog(ex);
}
};
CommonCtrl.CmbBindDict(cbo_bill_type_yt, "bill_type_yt", true); //单据类型
CommonCtrl.CmbBindDict(cbo_approve_status_yt, "review_status_name_yt", true); //宇通单据状态
}
示例8: Init
//初始化
private void Init()
{
dgvQData.MultiSelect = false; //不允许多选操作
SetUCBaseFuncationVisible();
#region 初始化时间控件值
dtpCBSTime.Value = DateTime.Now.AddMonths(-1);
dtpCBETime.Value = DateTime.Now.AddDays(+1);
#endregion
#region 初始化下拉框数据绑定
CommonCtrl.BindComboBoxByDictionarr(cboCBType, "sys_callback_type", true); //绑定回访类型
CommonCtrl.BindComboBoxByDictionarr(cboCBMode, "sys_callback_mode", true); //绑定回访方式
#endregion
#region 注册功能按钮事件
#region 清除查询条件
btnClear.Click += delegate
{
txtCBTitle.Caption = String.Empty;
cboCBType.SelectedValue = String.Empty;
cboCBMode.SelectedValue = String.Empty;
dtpCBSTime.Value = DateTime.Now.AddMonths(-1);
dtpCBETime.Value = DateTime.Now.AddDays(1);
txtCustomerName.Text = String.Empty;
txtCustomerName.Tag = String.Empty;
txtCBPerson.Text = String.Empty;
};
#endregion
#region 查询
btnQuery.Click += delegate
{
BindPageData();
};
#endregion
#region 选择客户信息
txtCustomerName.ChooserClick += delegate
{
var frmCustomer = new frmCustomerInfo();
var result = frmCustomer.ShowDialog();
if (result == DialogResult.OK)
{
txtCustomerName.Text = frmCustomer.strCustomerName;
txtCustomerName.Tag = frmCustomer.strCustomerId;
}
};
#endregion
#region 选择回访人
txtCBPerson.ChooserClick += delegate
{
var frmContacts= new frmContacts();
var result = frmContacts.ShowDialog();
if (result == DialogResult.OK)
{
txtCBPerson.Text = frmContacts.contName;
txtCBPerson.Tag = frmContacts.contID;
}
};
#endregion
#region 数据翻页
pageQ.PageIndexChanged += delegate
{
BindPageData();
};
#endregion
#region 数据表数据选择
dgvQData.CellDoubleClick += delegate(object sender, DataGridViewCellEventArgs args)
{
if (args.ColumnIndex <= 0) return;
var uc = new UCCallBackAddOrEdit {OpType = WindowStatus.View, UCCallBackManager = this};
var selectedData = dgvQData.SelectedRows[0];
uc.CallBackId = selectedData.Cells["drtxt_Callback_id"].Value.ToString();
var callbackInfo = DBHelper.GetTable("查询回访信息", "tb_CustomerSer_Callback", "*",
"Callback_id = '" + uc.CallBackId + "'", "",
"");
if (callbackInfo != null && callbackInfo.DefaultView.Count != 0)
{
uc.CustId = callbackInfo.DefaultView[0]["Callback_corp"].ToString();
uc.ContId = callbackInfo.DefaultView[0]["Callback_by"].ToString();
uc.HandleId = callbackInfo.DefaultView[0]["handle_name"].ToString();
}
uc.addUserControl(uc, "客户回访-预览", "UCCallBackView", Tag.ToString(), Name);
};
#endregion
#region 数据表格数据格式化
dgvQData.CellFormatting += delegate(object sender, DataGridViewCellFormattingEventArgs args)
{
UIAssistants.DgvCellDataConvert2Table(dgvQData, args, "Callback_by", "tb_contacts", "cont_id", "cont_name");
UIAssistants.DgvCellDataConvert2Table(dgvQData, args, "handle_name", "sys_user", "user_id", "user_name");
UIAssistants.DgvCellDataConvert2Table(dgvQData, args, "Callback_corp", "tb_customer", "cust_id", "cust_name");
UIAssistants.DgvCellDataConvert2Datetime(dgvQData, args, "Callback_time");
UIAssistants.DgvCellDataConvert2DicData(dgvQData, args, "Callback_type"); //访问类型
UIAssistants.DgvCellDataConvert2DicData(dgvQData, args, "Callback_mode"); //访问形式
UIAssistants.DgvCellDataConvert2DicData(dgvQData, args, "status"); //状态
//.........这里部分代码省略.........
示例9: txtcust_code_ChooserClick
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtcust_code_ChooserClick(object sender, EventArgs e)
{
frmCustomerInfo chooseSupplier = new frmCustomerInfo();
chooseSupplier.ShowDialog();
string cust_id = chooseSupplier.strCustomerId;
if (!string.IsNullOrEmpty(cust_id))
{
txtcust_code.Text = chooseSupplier.strCustomerNo;
}
}
示例10: txtcCustName1_ChooserClick
//往来单位1选择器
private void txtcCustName1_ChooserClick(object sender, EventArgs e)
{
if (CommonCtrl.IsNullToString(cboOrderType.SelectedValue) == "")
{
return;
}
DataSources.EnumAccountVerification enumAccount = (DataSources.EnumAccountVerification)Convert.ToInt32(cboOrderType.SelectedValue);
switch (enumAccount)
{
case DataSources.EnumAccountVerification.YuShouToYingShou://预收冲应收
case DataSources.EnumAccountVerification.YingShouToYingShou://应收转应收
case DataSources.EnumAccountVerification.YingShouToYingFu://应收冲应付
case DataSources.EnumAccountVerification.YuShouToYuShou://预收转预收
frmCustomerInfo frmCustomer = new frmCustomerInfo();
if (frmCustomer.ShowDialog() == DialogResult.OK)
{
txtcCustName1.Tag = frmCustomer.strCustomerId;
txtcCustName1.Text = frmCustomer.strCustomerName;
if (txtcCustName2.Tag == null && enumAccount != DataSources.EnumAccountVerification.YingShouToYingFu)//没有选择应收客户,默认选择与预收客户相同
{
txtcCustName2.Tag = frmCustomer.strCustomerId;
txtcCustName2.Text = frmCustomer.strCustomerName;
}
}
break;
case DataSources.EnumAccountVerification.YuFuToYingFu://预付冲应付
case DataSources.EnumAccountVerification.YingFuToYingFu://应付转应付
case DataSources.EnumAccountVerification.YingFuToYingShou://应付冲应收
case DataSources.EnumAccountVerification.YuFuToYuFu://预付转预付
frmSupplier frmSupp = new frmSupplier();
if (frmSupp.ShowDialog() == DialogResult.OK)
{
txtcCustName1.Tag = frmSupp.supperID;
txtcCustName1.Text = frmSupp.supperName;
if (txtcCustName2.Tag == null && enumAccount != DataSources.EnumAccountVerification.YingFuToYingShou)
{
txtcCustName2.Tag = frmSupp.supperID;
txtcCustName2.Text = frmSupp.supperName;
}
}
break;
}
}
示例11: txtCustomNO_ChooserClick
/// <summary>
/// 客户编码选择器事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtCustomNO_ChooserClick(object sender, EventArgs e)
{
frmCustomerInfo frmCInfo = new frmCustomerInfo();
DialogResult result = frmCInfo.ShowDialog();
if (result == DialogResult.OK)
{
txtCustomNO.Text = frmCInfo.strCustomerNo;
txtCustomNO.Tag = frmCInfo.strCustomerId;
txtCustomName.Caption = frmCInfo.strCustomerName;
txtContact.Caption = frmCInfo.strLegalPerson;
#region 会员信息
DataTable dct = DBHelper.GetTable("获取会员信息", "tb_customer", "member_number,member_class,accessories_discount,workhours_discount", " is_member='1' and cust_id='" + txtCustomNO.Tag + "'", "", "");
if (dct.Rows.Count > 0)
{
DataRow dcr = dct.Rows[0];
txtMemberNo.Caption = CommonCtrl.IsNullToString(dcr["member_number"]);
txtMemberGrade.Caption = GetDicName(CommonCtrl.IsNullToString(dcr["member_class"]));
txtMemberPZk.Caption = CommonCtrl.IsNullToString(dcr["workhours_discount"]);
txtMemberLZk.Caption = CommonCtrl.IsNullToString(dcr["accessories_discount"]);
}
else
{
txtMemberNo.Caption = string.Empty;
txtMemberGrade.Caption = string.Empty;
txtMemberPZk.Caption = string.Empty;
txtMemberLZk.Caption = string.Empty;
}
#endregion
}
}
示例12: txtcust_code1_ChooserClick
/// <summary> 选择客户编码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtcust_code1_ChooserClick(object sender, EventArgs e)
{
frmCustomerInfo chooseSupplier = new frmCustomerInfo();
chooseSupplier.ShowDialog();
cust_id = chooseSupplier.strCustomerId;
if (!string.IsNullOrEmpty(cust_id))
{
cust_code = chooseSupplier.strCustomerNo;
txtcust_code1.Text = chooseSupplier.strCustomerNo;
txtcust_name.Caption = chooseSupplier.strCustomerName;
txtclosing_unit1.Text = chooseSupplier.strCustomerName;
DataTable dt = DBHelper.GetTable("查询客户档案信息", "tb_customer", "*", " enable_flag != 0 and cust_id='" + cust_id + "'", "", "");
if (dt.Rows.Count > 0)
{
txtfax.Caption = dt.Rows[0]["cust_fax"].ToString();
txtcontacts_tel.Caption = dt.Rows[0]["cust_tel"].ToString();
}
string TableName = string.Format(@"(
select cont_name from tb_contacts where cont_id=
(select cont_id from tr_base_contacts where relation_object_id='{0}' and is_default='1')
) tb_conts", cust_id);
DataTable dt_conts = DBHelper.GetTable("查询客户默认的联系人信息", TableName, "*", "", "", "");
if (dt_conts != null && dt_conts.Rows.Count > 0)
{
txtcontacts.Caption = dt_conts.Rows[0]["cont_name"].ToString();
}
else
{ txtcontacts.Caption = string.Empty; }
}
}
示例13: txtCustCode_ChooserClick
//选择器
private void txtCustCode_ChooserClick(object sender, EventArgs e)
{
//应收选择客户
if (orderType == DataSources.EnumOrderType.RECEIVABLE)
{
frmCustomerInfo frm = new frmCustomerInfo();
if (frm.ShowDialog() == DialogResult.OK)
{
txtCustCode.Text = frm.strCustomerNo;
txtCustName.Caption = frm.strCustomerName;
}
}
else if (orderType == DataSources.EnumOrderType.PAYMENT)//应付选择供应商
{
frmSupplier frmSupp = new frmSupplier();
if (frmSupp.ShowDialog() == DialogResult.OK)
{
txtCustCode.Text = frmSupp.supperCode;
txtCustName.Caption = frmSupp.supperName;
}
}
}
示例14: InitQueryControlDataSource
private void InitQueryControlDataSource() //初始化查询控件数据项
{
dtp_repairs_time_s.Value = DateTime.Now.AddMonths(-1);
dtp_repairs_time_e.Value = DateTime.Now.AddDays(1);
dtp_approval_date_s.Value = DateTime.Now.AddMonths(-1);
dtp_approval_date_e.Value = DateTime.Now.AddDays(1);
txt_vehicle_no.ChooserClick += delegate //车牌号
{
var vechicleChooser = new frmVehicleGrade();
var result = vechicleChooser.ShowDialog();
if (result != DialogResult.OK) return;
txt_vehicle_no.Text = vechicleChooser.strLicensePlate;
};
txt_customer_code.ChooserClick += delegate //客户编码(同时会更新客户名称)
{
var custChooser = new frmCustomerInfo();
var result = custChooser.ShowDialog();
if (result != DialogResult.OK) return;
txt_customer_code.Text = custChooser.strCustomerNo;
txt_customer_name.Caption = custChooser.strCustomerName;
};
CommonCtrl.CmbBindDict(cbo_bill_type_yt, "bill_type_yt", true); //单据类型
CommonCtrl.CmbBindDict(cbo_info_status, "sys_service_info_status", true); //单据状态
CommonCtrl.CmbBindDict(cbo_approve_status_yt, "review_status_name_yt", true); //宇通单据状态
}
示例15: txtPartCustomCode_ChooserClick
/// <summary>
/// 按维修项目查询-客户编码选择器事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtPartCustomCode_ChooserClick(object sender, EventArgs e)
{
frmCustomerInfo frmCInfo = new frmCustomerInfo();
DialogResult result = frmCInfo.ShowDialog();
if (result == DialogResult.OK)
{
txtPartCustomCode.Text = frmCInfo.strCustomerNo;
txtPartCustomCode.Tag = frmCInfo.strCustomerId;
}
}