using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CoreFS.CA06;
using Core.Mes.Client.Comm.Server;
using Infragistics.Win.UltraWinGrid;
using System.Collections;
using Core.Mes.Client.Comm.Tool;
using Core.Mes.Client.Comm.Control;
using Core.StlMes.Client.SaleOrder;
namespace Core.StlMes.Client.SaleOrder
{
public partial class FrmOrderMoneyAsk : FrmBase
{
int indexche = 0; //付款类型ID
private DataTable order_pk = new DataTable();
///
/// 合同头内部主键
///
public DataTable Order_pk
{
set { order_pk = value; }
}
string manag_no = ""; //管理卡号
string order_no = ""; //合同号
string balnce_mny_no = "";//结算付款编号
string balnce_mny_seq = "";//结算付款序号
string payment_node = ""; //付款节点
string term = "";//期限
string term_unit = "";//日期单位(天/工作日/月)
string payment_ratio = "";//付款比率(%)
string stringAll = "";//返回拼接字符串
DataTable tableOrder = new DataTable("SLM_ORDER_BALNCE_MNY");//返回给主界面
public delegate void GetOrderMoneyAskHander(string stAll, DataTable retunData);
public event GetOrderMoneyAskHander GetOrderMoneyAsk;
private string askDesc = "";
///
/// 付款要求
///
public string AskDesc
{
get { return askDesc; }
set { askDesc = value; }
}
public FrmOrderMoneyAsk()
{
InitializeComponent();
}
public FrmOrderMoneyAsk(string managName, string orderName)
{
manag_no = managName;
order_no = orderName;
InitializeComponent();
}
private void ultraButtonClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void MSBox_ValueChanged(object sender, EventArgs e)
{
if (this.MSBox.CheckedIndex != -1)
{
indexche = this.MSBox.CheckedIndex;
}
}
private void MSBox_MouseCaptureChanged(object sender, EventArgs e)
{
if (this.MSBox.CheckedIndex != -1)
{
this.MSBox.CheckedIndex = -1;
}
}
private void ultraButtonCom_Click(object sender, EventArgs e)
{
tableOrder.Clear();
switch (indexche)
{
case 0:
this.stringAll = this.MS001Lab.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS001", "001", "121101", 0, " ", "100", stringAll); //付全款排产
break;
case 1:
//付%款排产,收余下款发货。
if (Convert.ToInt32(MS002Editor1.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS002Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS002Editor0.Focus();
break;
}
this.stringAll = this.MS002Lab0.Text +this.MS002Editor0.Value.ToString()+ this.MS002Lab1.Text + this.MS002Editor1.Value.ToString() + this.MS002Lab2.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS002", "001", "121101", 0, " ", this.MS002Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS002", "002", "121102", 0, " ", Convert.ToString(100 - Convert.ToInt32(this.MS002Editor1.Value)), stringAll);
break;
case 2:
if (Convert.ToInt32(MS003Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS003Editor0.Focus();
break;
}
this.stringAll = this.MS003Lab0.Text +this.MS003Editor0.Value.ToString()+this.MS003Lab1.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS003", "001", "121102", 0, " ", "100", stringAll); //付全款发货
break;
case 3:
//支付%款后发货,发货以后多少天付款,付款比例不写。
if (Convert.ToInt32(MS004Editor1.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS004Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS004Editor0.Focus();
break;
}
this.stringAll = this.MS004Lab0.Text + this.MS004Editor0.Value.ToString() + this.MS004Lab1.Text + this.MS004Editor1.Value.ToString() + this.MS004Lab2.Text + this.MS004Editor2.Value.ToString() + this.MS004Lab3.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS004", "001", "121102", 0, " ", this.MS004Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS004", "002", "121103", Convert.ToInt32(this.MS004Editor2.Value), "天", Convert.ToString(100 - Convert.ToInt32(this.MS004Editor1.Value)), stringAll);
break;
case 4:
//支付%款后发货,发货以后多少天付%款无付款比例,质保期多少个月付清余款有付款比例。
if ((Convert.ToInt32(MS005Editor1.Value) + Convert.ToInt32(MS005Editor3.Value)) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS005Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS005Editor0.Focus();
break;
}
this.stringAll = this.MS005Lab0.Text + this.MS005Editor0.Value.ToString() + this.MS005Lab1.Text + this.MS005Editor1.Value.ToString() + this.MS005Lab2.Text + this.MS005Editor2.Value.ToString() + this.MS005Lab3.Text + this.MS005Editor3.Value.ToString() + this.MS005Lab4.Text + this.MS005Editor4.Value.ToString() + this.MS005Label5.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS005", "001", "121102", 0, " ", this.MS005Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS005", "002", "121103", Convert.ToInt32(this.MS005Editor2.Value), "天", Convert.ToString(100 - Convert.ToInt32(this.MS005Editor1.Value)), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS005", "003", "121107", Convert.ToInt32(this.MS005Editor4.Value), "月", Convert.ToString(this.MS005Editor3.Value), stringAll);
break;
case 5:
//支付%款后发货,发货以后多少天付清%款。
if (Convert.ToInt32(MS006Editor1.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS006Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS006Editor0.Focus();
break;
}
this.stringAll = this.MS006Lab0.Text + this.MS006Editor0.Value.ToString() + this.MS006Lab1.Text + this.MS006Editor1.Value.ToString() + this.MS006Lab2.Text + this.MS006Editor2.Value.ToString() + this.MS006Lab3.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS006", "001", "121102", 0, " ", this.MS006Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS006", "002", "121103", Convert.ToInt32(this.MS006Editor2.Value), "天", Convert.ToString(100 - Convert.ToInt32(this.MS006Editor1.Value)), stringAll);
break;
case 6:
//支付%款后发货,发货收齐以后多少天付%款无付款比例,质保期多少个月付清余款有付款比例。
if ((Convert.ToInt32(MS007Editor1.Value) + Convert.ToInt32(MS007Editor3.Value)) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS007Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS007Editor0.Focus();
break;
}
this.stringAll = this.MS007Lab0.Text + this.MS007Editor0.Value.ToString() + this.MS007Lab1.Text + this.MS007Editor1.Value.ToString() + this.MS007Lab2.Text + this.MS007Editor2.Value.ToString() + this.MS007Lab3.Text + this.MS007Editor3.Value.ToString() + this.MS007Lab4.Text + this.MS007Editor4.Value.ToString() + this.MS007Lab5.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS007", "001", "121102", 0, " ", this.MS007Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS007", "002", "121104", Convert.ToInt32(this.MS007Editor2.Value), "天", 0, stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS007", "003", "121107", Convert.ToInt32(this.MS007Editor4.Value), "月", Convert.ToString(this.MS007Editor3.Value), stringAll);
break;
case 7:
//支付%款后发货,余款发票开出后多少天付款,付款比例不写。
if (Convert.ToInt32(MS008Editor1.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS008Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS008Editor0.Focus();
break;
}
this.stringAll = this.MS008Lab0.Text + this.MS008Editor0.Value.ToString() + this.MS008Lab1.Text + this.MS008Editor1.Value.ToString() + this.MS008Lab2.Text + this.MS008Editor2.Value.ToString() + this.MS008Lab3.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS008", "001", "121102", 0, " ", this.MS008Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS008", "002", "121105", Convert.ToInt32(this.MS008Editor2.Value), "天", 0, stringAll);
break;
case 8:
//支付%款后发货,余款发票开出后多少天付款,付款比例不写,质保期多少个月付清余款有付款比例。
if ((Convert.ToInt32(MS009Editor1.Value) + Convert.ToInt32(MS009Editor3.Value)) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS009Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS009Editor0.Focus();
break;
}
this.stringAll = this.MS009Lab0.Text + this.MS009Editor0.Value.ToString() + this.MS009Lab1.Text + this.MS009Editor1.Value.ToString() + this.MS009Lab2.Text + this.MS009Editor2.Value.ToString() + this.MS009Lab3.Text + this.MS009Editor3.Value.ToString() + this.MS009Lab4.Text + this.MS009Editor4.Value.ToString() + this.MS009Lab5.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS009", "001", "121102", 0, " ", this.MS009Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS009", "002", "121105", Convert.ToInt32(this.MS009Editor2.Value), "天", 0, stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS009", "003", "121107", Convert.ToInt32(this.MS009Editor4.Value), "月", Convert.ToString(this.MS009Editor3.Value), stringAll);
break;
case 9:
//1:排产%付款,2.付款%多少发运。百分比:排产-付款前发运=发票开出后多少天付款比例。
if ((Convert.ToInt32(MS010Editor1.Value) + Convert.ToInt32(MS010Editor2.Value)) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS010Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS010Editor0.Focus();
break;
}
this.stringAll = this.MS010Lab0.Text + this.MS010Editor0.Value.ToString() + this.MS010Lab1.Text + this.MS010Editor1.Value.ToString() + this.MS010Lab2.Text + this.MS010Editor2.Value.ToString() + this.MS010Lab3.Text + this.MS010Editor3.Value.ToString() + this.MS010Lab4.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS010", "001", "121101", 0, " ", this.MS010Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS010", "002", "121102", 0, " ", this.MS010Editor2.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS010", "003", "121105", this.MS010Editor3.Value.ToString(), "天", Convert.ToString(100 - (Convert.ToInt32(this.MS010Editor1.Value) + Convert.ToInt32(this.MS010Editor2.Value))), stringAll);
break;
case 10:
//1:排产%付款,2.付款%多少发运。百分比:排产-付款前发运=发票开出后多少天付款比例,质保金需要比例。
if ((Convert.ToInt32(MS011Editor1.Value) + Convert.ToInt32(MS011Editor2.Value) + Convert.ToInt32(MS011Editor4.Value)) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS011Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS011Editor0.Focus();
break;
}
this.stringAll = this.MS011Lab0.Text + this.MS011Editor0.Value.ToString() + this.MS011Lab1.Text + this.MS011Editor1.Value.ToString() + this.MS011Label2.Text + this.MS011Editor2.Value.ToString() + this.MS011Lab3.Text + this.MS011Editor3.Value.ToString() + this.MS011Lab4.Text + this.MS011Editor4.Value.ToString() + this.MS011Lab5.Text + this.MS011Editor5.Value.ToString() + this.MS011Label6.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS011", "001", "121101", 0, " ", this.MS011Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS011", "002", "121102", 0, " ", this.MS011Editor2.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS011", "003", "121105", this.MS011Editor3.Value.ToString(), "天", Convert.ToString(100 - (Convert.ToInt32(this.MS011Editor1.Value) + Convert.ToInt32(this.MS011Editor2.Value) + Convert.ToInt32(this.MS011Editor4.Value))), stringAll);
//tableOrder.Rows.Add(manag_no, order_no, "MS011", "004", "121107", this.MS011Editor5.Value.ToString(), "月", Convert.ToString(this.MS011Editor5.Value), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS011", "004", "121107", this.MS011Editor5.Value.ToString(), "月", Convert.ToString(this.MS011Editor4.Value), stringAll);
break;
case 11:
//1:货到多少工作日付款
if ((Convert.ToInt32(MS012Editor1.Value)) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
this.stringAll = this.MS012Lab1.Text + this.MS012Editor1.Value.ToString() + this.MS012Lab2.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS012", "001", "121106", Convert.ToInt32(this.MS012Editor1.Value), "天", "100", stringAll);
break;
case 12:
//1:货到多少工作日付款,保质期都有比列
if (Convert.ToInt32(MS013Editor2.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
this.stringAll = this.MS013Lab1.Text + this.MS013Editor1.Value.ToString() + this.MS013Label2.Text + this.MS013Editor2.Value.ToString() + this.MS013Lab3.Text + this.MS013Editor3.Value.ToString() + this.MS013Lab4.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS013", "001", "121106", Convert.ToInt32(this.MS013Editor1.Value), "天", Convert.ToString(100 - (Convert.ToInt32(this.MS013Editor2.Value))), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS013", "002", "121107", this.MS013Editor3.Value.ToString(), "月", this.MS013Editor2.Value.ToString(), stringAll);
break;
case 13:
//1:开票后出多少
//if (Convert.ToInt32(MS014Editor1.Value) > 100)
//{
// MessageUtil.ShowWarning("填写的百分比不能大于100%。");
// break;
//}
this.stringAll = this.MS014Lab1.Text + this.MS014Editor1.Value.ToString() + this.MS014Label2.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS014", "001", "121105", Convert.ToInt32(this.MS014Editor1.Value), "天", "100", stringAll);
break;
case 14:
//1:开票后出多少工作日付款,保质期都有比列
if (Convert.ToInt32(MS015Editor2.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
//this.stringAll = this.MS015Lab1.Text + this.MS015Editor1.Value.ToString() + this.MS015Lab2.Text + this.MS015Editor2.Value.ToString() + this.MS015Lab3.Text + this.MS015Editor3.Value.ToString() + this.MS015Lab4.Text;
//tableOrder.Rows.Add(manag_no, order_no, "MS015", "001", "121106", Convert.ToInt32(this.MS015Editor1.Value), "天", Convert.ToString(100 - Convert.ToInt32(this.MS015Editor2.Value)), stringAll);
//tableOrder.Rows.Add(manag_no, order_no, "MS015", "002", "121107", 0, " ", this.MS015Editor2.Value.ToString(), stringAll);
this.stringAll = this.MS015Lab1.Text + this.MS015Editor1.Value.ToString() + this.MS015Lab2.Text + this.MS015Editor2.Value.ToString() + this.MS015Lab3.Text + this.MS015Editor3.Value.ToString() + this.MS015Lab4.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS015", "001", "121106", Convert.ToInt32(this.MS015Editor1.Value), "天", Convert.ToString(100 - Convert.ToInt32(this.MS015Editor2.Value)), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS015", "002", "121107", Convert.ToInt32(this.MS015Editor3.Value), "月", this.MS015Editor2.Value.ToString(), stringAll);
break;
case 15:
this.stringAll = "/";
break;
case 16:
this.stringAll = "即期";
break;
case 17:
this.stringAll = "远期";
break;
case 18:
if (MS018Editor1.Value == null || MS018Editor2.Value == null)
{
MessageUtil.ShowWarning("请填入百分比!");
break;
}
if (Convert.ToDouble(MS018Editor1.Value) + Convert.ToDouble(MS018Editor2.Value) > 100)
{
MessageUtil.ShowWarning("填写的百分比不能大于100%。");
break;
}
if (Convert.ToInt32(MS018Editor0.Value) == 0)
{
MessageUtil.ShowWarning("填写的合同签订XXX日内必须大于0");
MS018Editor0.Focus();
break;
}
stringAll = this.MS018Lab0.Text + this.MS018Editor0.Value.ToString() + MS018Lab2.Text + MS018Editor1.Value.ToString() + MS018Lab3.Text + MS018Editor2.Value.ToString() + MS018Lab4.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS016", "001", "121102", 0, "", this.MS018Editor1.Value.ToString(), stringAll);
tableOrder.Rows.Add(manag_no, order_no, "MS016", "002", "121102", 0, "", this.MS018Editor2.Value.ToString(), stringAll);
break;
case 19:
if (MS019Editor1.Value == null)
{
MessageUtil.ShowWarning("请输入天数!");
break;
}
stringAll = MS019Lab1.Text + MS019Editor1.Value.ToString() + MS019Lab2.Text;
tableOrder.Rows.Add(manag_no, order_no, "MS017", "001", "121108", Convert.ToInt16(this.MS019Editor1.Value.ToString()), "天", "", stringAll);
break;
case 20:
this.stringAll = "按协议付款";
break;
case 21:
this.stringAll = "持票付款";
break;
case 22:
this.stringAll = "抹账购管";
break;
case 23:
this.stringAll = "与坯料合同货款对冲后,带款提货";
break;
case 24:
this.stringAll = "当月开票货款,当月全部结清";
break;
case 25:
if (MS025Editor1.Value == null || MS025Editor2.Value == null)
{
MessageUtil.ShowWarning("请输入天数!");
break;
}
stringAll = MS025Lab1.Text + MS025Editor1.Value.ToString() + MS025Lab2.Text + MS025Editor2.Value.ToString() + MS025Lab3.Text;
//tableOrder.Rows.Add(manag_no, order_no, "MS017", "001", "121108", Convert.ToInt16(this.MS019Editor1.Value.ToString()), "天", "", stringAll);
break;
case 26:
if (txtMemo.Text.Trim() == "")
{
MessageUtil.ShowWarning("请输入备注信息!");
break;
}
this.stringAll = "见备注栏:" + txtMemo.Text.Trim();
break;
}
//返回给主界面数据
if (!stringAll.Trim().Equals(""))
{
GetOrderMoneyAsk(this.stringAll, this.tableOrder);
this.Close();
}
}
private void orderAskLoad_Call(DataTable table)
{
string balncemnyno = table.Rows.Count > 0 ? table.Rows[0]["BALNCE_MNY_NO"].ToString() : "MS000";
switch (balncemnyno)
{
case "MS001":
indexche = 0;
this.MSBox.Items[0].ValueList.SelectedIndex = 0;
break;
case "MS002":
indexche = 1;
//付%款排产,收余下款发货。
this.MSBox.Items[0].ValueList.SelectedIndex = 1;
this.MS002Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
break;
case "MS003":
indexche = 2;
this.MSBox.Items[0].ValueList.SelectedIndex = 2;
break;
case "MS004":
indexche = 3;
//支付%款后发货,发货以后多少天付款,付款比例不写。
this.MSBox.Items[0].ValueList.SelectedIndex = 3;
this.MS004Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS004Editor2.Value = table.Rows[1]["PAYMENT_RATIO"].ToString();
break;
case "MS005":
indexche = 4;
//支付%款后发货,发货以后多少天付%款无付款比例,质保期多少个月付清余款有付款比例。
this.MSBox.Items[0].ValueList.SelectedIndex = 4;
this.MS005Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS005Editor2.Value = table.Rows[1]["TERM"].ToString();
this.MS005Editor3.Value = table.Rows[2]["PAYMENT_RATIO"].ToString();
this.MS005Editor4.Value = table.Rows[2]["TERM"].ToString();
break;
case "MS006":
indexche = 5;
//支付%款后发货,发货以后多少天付清%款。
this.MSBox.Items[0].ValueList.SelectedIndex = 5;
this.MS006Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS006Editor2.Value = table.Rows[1]["TERM"].ToString();
break;
case "MS007":
indexche = 6;
//支付%款后发货,发货收齐以后多少天付%款无付款比例,质保期多少个月付清余款有付款比例。
this.MSBox.Items[0].ValueList.SelectedIndex = 6;
this.MS007Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS007Editor2.Value = table.Rows[1]["TERM"].ToString();
this.MS007Editor3.Value = table.Rows[2]["TERM"].ToString();
this.MS007Editor4.Value = table.Rows[2]["PAYMENT_RATIO"].ToString();
break;
case "MS008":
indexche = 7;
//支付%款后发货,余款发票开出后多少天付款,付款比例不写。
this.MSBox.Items[0].ValueList.SelectedIndex = 7;
this.MS008Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS008Editor2.Value = table.Rows[1]["TERM"].ToString();
break;
case "MS009":
indexche = 8;
//支付%款后发货,余款发票开出后多少天付款,付款比例不写,质保期多少个月付清余款有付款比例。
this.MSBox.Items[0].ValueList.SelectedIndex = 8;
this.MS009Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS009Editor2.Value = table.Rows[1]["TERM"].ToString();
this.MS009Editor3.Value = table.Rows[2]["PAYMENT_RATIO"].ToString();
this.MS009Editor4.Value = table.Rows[2]["TERM"].ToString();
break;
case "MS010":
indexche = 9;
//1:排产%付款,2.付款%多少发运。百分比:排产-付款前发运=发票开出后多少天付款比例。
this.MSBox.Items[0].ValueList.SelectedIndex = 9;
this.MS010Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS010Editor2.Value = table.Rows[1]["PAYMENT_RATIO"].ToString();
this.MS010Editor3.Value = table.Rows[2]["TERM"].ToString();
break;
case "MS011":
indexche = 10;
//1:排产%付款,2.付款%多少发运。百分比:排产-付款前发运=发票开出后多少天付款比例,质保金需要比例。
this.MSBox.Items[0].ValueList.SelectedIndex = 10;
this.MS011Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
this.MS011Editor2.Value = table.Rows[1]["PAYMENT_RATIO"].ToString();
this.MS011Editor3.Value = table.Rows[2]["PAYMENT_RATIO"].ToString();
this.MS011Editor4.Value = table.Rows[3]["PAYMENT_RATIO"].ToString();
this.MS011Editor5.Value = table.Rows[3]["TERM"].ToString();
break;
case "MS012":
indexche = 11;
//1:货到多少工作日付款
this.MSBox.Items[0].ValueList.SelectedIndex = 11;
this.MS012Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
break;
case "MS013":
indexche = 12;
//1:货到多少工作日付款,保质期都有比列
this.MSBox.Items[0].ValueList.SelectedIndex = 12;
this.MS013Editor1.Value = table.Rows[0]["TERM"].ToString();
this.MS013Editor2.Value = table.Rows[1]["PAYMENT_RATIO"].ToString();
this.MS013Editor3.Value = table.Rows[1]["TERM"].ToString();
break;
case "MS014":
indexche = 13;
//1:开票后出多少
this.MSBox.Items[0].ValueList.SelectedIndex = 13;
this.MS014Editor1.Value = table.Rows[0]["TERM"].ToString();
break;
case "MS015":
indexche = 14;
//1:开票后出多少工作日付款,保质期都有比列
this.MSBox.Items[0].ValueList.SelectedIndex = 14;
this.MS015Editor1.Value = table.Rows[0]["TERM"].ToString();
this.MS015Editor2.Value = table.Rows[1]["PAYMENT_RATIO"].ToString();
this.MS015Editor3.Value = table.Rows[1]["TERM"].ToString();
break;
case "MS016":
indexche = 18;
this.MSBox.Items[0].ValueList.SelectedIndex = 18;
MS018Editor1.Value = table.Rows[0]["PAYMENT_RATIO"].ToString();
MS018Editor2.Value = table.Rows[1]["PAYMENT_RATIO"].ToString();
break;
case "MS017":
indexche = 19;
this.MSBox.Items[0].ValueList.SelectedIndex = 19;
MS019Editor1.Value = table.Rows[0]["TERM"].ToString();
break;
default:
indexche = 15;
this.MSBox.Items[0].ValueList.SelectedIndex = 15;
break;
}
}
private void FrmOrderMoneyAsk_Load(object sender, EventArgs e)
{
tableOrder.Columns.Add("MANAG_NO", typeof(System.String));
tableOrder.Columns.Add("ORDER_NO", typeof(System.String));
tableOrder.Columns.Add("BALNCE_MNY_NO", typeof(System.String));
tableOrder.Columns.Add("BALNCE_MNY_SEQ", typeof(System.String));
tableOrder.Columns.Add("PAYMENT_NODE", typeof(System.String));
tableOrder.Columns.Add("TERM", typeof(System.Int32));
tableOrder.Columns.Add("TERM_UNIT", typeof(System.String));
tableOrder.Columns.Add("PAYMENT_RATIO", typeof(System.String));
tableOrder.Columns.Add("MEMO", typeof(System.String));
//定位已存在的资金要求
this.orderAskLoad_Call(order_pk);
if(this.AskDesc.Contains("见备注栏"))
{
int startIndex = AskDesc.IndexOf(":") + 1;
int length = AskDesc.Length - AskDesc.IndexOf(":")-1;
txtMemo.Text = AskDesc.Substring(startIndex, length);
this.MSBox.Items[0].ValueList.SelectedIndex = 24;
}
}
}
}