| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- 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;
- namespace Core.StlMes.Client.GlBusiness.Dialog
- {
- public partial class FrmGlMoneyAsk : FrmBase
- {
- int indexche = 0; //付款类型ID
- private String ordPk = "";
- /// <summary>
- /// 合同头内部主键
- /// </summary>
- public String OrdPk
- {
- set { ordPk = value; }
- get { return ordPk; }
- }
- 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 = "";//返回拼接字符串
- public delegate void GetOrderMoneyAskHander(string stAll);
- public event GetOrderMoneyAskHander GetOrderMoneyAsk;
- private string askDesc = "";
- /// <summary>
- /// 付款要求
- /// </summary>
- public string AskDesc
- {
- get { return askDesc; }
- set { askDesc = value; }
- }
- public FrmGlMoneyAsk()
- {
- 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)
- {
- switch (indexche)
- {
- case 0:
- this.stringAll = this.MS001Lab.Text;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- break;
- case 19:
- if (MS019Editor1.Value == null)
- {
- MessageUtil.ShowWarning("请输入天数!");
- break;
- }
- stringAll = MS019Lab1.Text + MS019Editor1.Value.ToString() + MS019Lab2.Text;
- break;
- case 20:
- this.stringAll = "按协议付款";
- break;
- case 21:
- this.stringAll = "持票付款";
- break;
- case 22:
- this.stringAll = "抹账购管";
- break;
- case 23:
- this.stringAll = "与坯料合同货款对冲后,带款提货";
- break;
- case 24:
- if (txtMemo.Text.Trim() == "")
- {
- MessageUtil.ShowWarning("请输入备注信息!");
- break;
- }
- this.stringAll = "见备注栏:" + txtMemo.Text.Trim();
- break;
-
- }
- //返回给主界面数据
- if (!stringAll.Trim().Equals(""))
- {
- GetOrderMoneyAsk(this.stringAll);
- this.Close();
- }
- }
- private void FrmOrderMoneyAsk_Load(object sender, EventArgs e)
- {
- }
- }
- }
|