| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643 |
- 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.StlMes.Client.YdmBase;
- using Core.Mes.Client.Comm.Tool;
- using System.Collections;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win;
- using Core.StlMes.Client.PipeLeaveFactory.YdmObject;
- using Core.Mes.Client.Comm.Format;
- using com.steering.pss.ydm.entity;
- using Core.StlMes.Client.PipeLeaveFactory.Tool;
- using Core.StlMes.Client.SaleOrder.ReviewForm;
- using Core.StlMes.Client.YdmPipeManage;
- using Infragistics.Win.UltraWinEditors;
- using Core.StlMes.Client.PipeLeaveFactory.Dialog;
- namespace Core.StlMes.Client.PipeLeaveFactory
- {
- public partial class frmPipeTrainBill : FrmBase
- {
- /// <summary>
- /// 销售权限
- /// </summary>
- private string[] _salgPersion = null;
- /// <summary>
- /// 提示信息
- /// </summary>
- private string errMessage = "";
- ArrayList pram = new ArrayList();
- private string _sendPlanNo = "";
- private string _ordLnDlyPk = "";
- private string _ordLnDlyPkSoure = "";
- private string _billNo = "";
- private string departid;//对应部门ID
- private string departname;//对应部门
- private string management_no;//对应科室id
- private string management_name;//对应科室
- public frmPipeTrainBill()
- {
- InitializeComponent();
- this.IsLoadUserView = true;
- }
- UltraComboEditor uceVstel = new UltraComboEditor();//装车地点
- UltraComboEditor uceStorag = new UltraComboEditor();//出库地点
- UltraComboEditor uceLoad = new UltraComboEditor();
- UltraComboEditor uceDelvryN = new UltraComboEditor();//发货去向
- private void frmPipeTrainBill_Load(object sender, EventArgs e)
- {
- _salgPersion = BaseHelper.InitPermissions(this.ValidDataPurviewIds, this.ob);
- BaseHelper.setOtherColumnReadOnly(ultraGridSendPlan, new string[] { "" });
- BaseHelper.setOtherColumnReadOnly(ultraGridOrder, new string[] { "" });
- BaseHelper.setOtherColumnReadOnly(ultraGridSourse, new string[] { "CHC", "ActCount", "Vstel", "SendNum" });
- BaseHelper.setOtherColumnReadOnly(ultraGridBillM, new string[] { "CHC", "DelvryWhereabouts", "Realinvoiceno1" });
- BaseHelper.setOtherColumnReadOnly(ultraGridBillC, new string[] { "CANCELDOWN", "StorageNo", "CHK", "Vstel" });
- EntityHelper.ShowGridCaption<MatInfoEntity>(ultraGridSourse.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<YdmZcBillMEntity>(ultraGridBillM.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<YdmZcBillCEntity>(ultraGridBillC.DisplayLayout.Bands[0]);
- //EntityHelper.ShowGridCaption<PipeMatGpMEntity>(ultraGridPipeMat.DisplayLayout.Bands[0]);
- BillBtime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
- BillEtime.Value = DateTime.Parse(DateTime.Now.AddDays(10).ToString("yyyy-MM-dd"));
- DateTime now = DateTime.Now;
- DateTime dt1 = new DateTime(now.Year, now.Month, 1);//当月第一天
- DateTime dt2 = dt1.AddMonths(1).AddDays(-1);//当月最后一天
- billNoStime.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
- BillNoEtime.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
- YdmBaseClass.SetComboItemHeight(ComStatus);
- YdmBaseClass.SetComboItemHeight(ComBillStratus);
- BaseHelper.InitCellPosition(ultraGridSendPlan, new string[] { "PLAN_WT" });
- BaseHelper.InitCellPosition(ultraGridOrder, new string[] { "PREP_WT", "PLAN_WT", "WGT_ESTMT" });
- BaseHelper.InitCellPosition(ultraGridSourse, new string[] { "ActCount", "ActWeight", "YbCount", "YbWeight", "KcCount", "KcWeight", "ActLen", "YbLen", "KcLen", "SendNum" });
- BaseHelper.InitCellPosition(ultraGridBillM, new string[] { "PlanWt", "PlanNum", "PlanTotlLen", "SendNum" });
- BaseHelper.InitCellPosition(ultraGridBillC, new string[] { "ActHeight", "ActDimater", "ActLenMin1", "ActLenMax1", "ActCount", "ActWeight", "PrepWeight", "PrepCount", "BeenCount", "BeenWeight", "PrepLen", "BeenLen", "ActLen", "SendNum" });
- DoInitComDrop();
- BaseHelper.setUltraGridColumnColor(ultraGridSourse, new string[] { "ActCount", "Vstel", "ActLen", "SendNum" }, Color.FromArgb(255, 255, 192));
- BaseHelper.InitYear(ComYear);
- BaseHelper.InitMonth(ComMonth);
- ComYear.Value = DateTime.Now.Year.ToString();
- ComMonth.Value = string.Format("{0:00}", DateTime.Now.Month);
- BaseHelper.setUltraGridColumnMaxInput(ultraGridSendPlan, new string[] { "PLAN_WT" });
- BaseHelper.setUltraGridColumnMaxInput(ultraGridOrder, new string[] { "PLAN_WT", "PREP_WT", "WGT_ESTMT" });
- BaseHelper.setUltraGridColumnMaxInput(ultraGridSourse, new string[] { "ActWeight", "YbWeight", "KcWeight", "SendNum" });
- DivideInterface(CustomInfo);
- BaseHelper.setUltraGridColumnMaxInput(ultraGridBillM, new string[] { "PlanWt" });
- BaseHelper.setUltraGridColumnMaxInput(ultraGridBillC, new string[] { "ActWeight", "PrepWeight", "BeenWeight", "SendNum" });
- //长度
- BaseHelper.setUltraGridColumnMaxInputLen(ultraGridSourse, new string[] { "ActLen", "YbLen", "KcLen" });
- BaseHelper.setUltraGridColumnMaxInputLen(ultraGridBillM, new string[] { "PlanTotlLen", "SendNum" });
- BaseHelper.setUltraGridColumnMaxInputLen(ultraGridBillC, new string[] { "PrepLen", "BeenLen", "ActLen" });
- //统计字段(吨)
- BaseHelper.GridColumnSum(ultraGridOrder, new string[] { "PLAN_WT", "PREP_WT", "WGT_ESTMT" });
- BaseHelper.GridColumnSum(ultraGridSourse, new string[] { "ActWeight", "KcWeight", "YbWeight", "SendNum" });
- BaseHelper.GridColumnSum(ultraGridBillM, new string[] { "PlanWt", "SendNum" });
- BaseHelper.GridColumnSum(ultraGridBillC, new string[] { "ActWeight", "PrepWeight", "BeenWeight", "SendNum" });
- BaseHelper.GridColumnSum(ultraGridSendPlan, new string[] { "PLAN_WT" });
- //统计字段(支)
- BaseHelper.GridColumnCount(ultraGridSourse, new string[] { "ActCount", "KcCount", "YbCount" });
- BaseHelper.GridColumnCount(ultraGridBillM, new string[] { "PlanNum" });
- BaseHelper.GridColumnCount(ultraGridBillC, new string[] { "ActCount", "PrepCount", "BeenCount" });
- //统计字段(长度)
- BaseHelper.GridColumnCountLen(ultraGridSourse, new string[] { "ActLen", "YbLen", "KcLen" });
- BaseHelper.GridColumnCountLen(ultraGridBillM, new string[] { "PlanTotlLen" });
- BaseHelper.GridColumnCountLen(ultraGridBillC, new string[] { "PrepLen", "BeenLen", "ActLen" });
- YdmBaseClass.InitComboEditor(uceVstel, "com.steering.pss.ydm.pipemanage.CorePipeInTemp.getStorageDetail", "STORAGE_NO", this.ob, false);
- YdmBaseClass.BindColumn(uceVstel, "Vstel", this.Controls, this.ultraGridSourse, 0);
- YdmBaseClass.InitComboEditor(uceStorag, "com.steering.pss.ydm.pipemanage.CorePipeInTemp.getStorageDetail", "STORAGE_NO", this.ob, false);
- YdmBaseClass.BindColumn(uceStorag, "StorageNo", this.Controls, this.ultraGridBillC, 0);
- YdmBaseClass.InitComboEditor(uceLoad, "com.steering.pss.ydm.pipemanage.CorePipeInTemp.getStorageDetail", "STORAGE_NO", this.ob, false);
- YdmBaseClass.BindColumn(uceLoad, "Vstel", this.Controls, this.ultraGridBillC, 0);
- YdmBaseClass.InitComboEditor(uceDelvryN, "com.steering.pss.ydm.pipemanage.CorePipeInTemp.getStorageDetail", "STORAGE_NO", this.ob, false);
- YdmBaseClass.BindColumn(uceDelvryN, "DelvryWhereabouts", this.Controls, this.ultraGridBillM, 0);
- management_no = this.UserInfo.GetDeptid();
- management_name = this.UserInfo.GetDepartment();
- departid = ClsBaseInfo.GetDepartIdBySectionId(UserInfo.GetDeptid(), this.ob);
- departname = ClsBaseInfo.GetDepartBySectionId(UserInfo.GetDeptid(), this.ob);
- }
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- DoQuery();
- break;
- case "Add":
- DoAddBill();
- break;
- case "Update":
- DoDelete();
- break;
- case "Down":
- DoDown();
- break;
- case "Refresh":
- DoInitComDrop();
- break;
- case "Export":
- Export();
- break;
- case "CancelDown":
- CancelDown();
- break;
- case "BillDrawOff":
- BillDrawOff();
- break;
- case "CancelBillDrawOff":
- CancelBillDrawOff();
- break;
- case "Print":
- Print();
- break;
- case "UpdateStoage":
- doUpdateStoage();//修改出库地点
- break;
- case "UpdateLoad":
- doUpdateLoad();//修改装车地点
- break;
- case "BillOut":
- doBillOut();
- break;
- case "DeleteBillOut":
- doDeleteBillOut();//撤销出库
- break;
- case "UpdateDelvryWhereabouts":
- UpdateDelvryWhereabouts();//修改发货去向
- break;
- case "UpdateRealinvoiceno1":
- UpdateRealinvoiceno1();//修改结算状态
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void UpdateRealinvoiceno1()
- {
- ultraGridBillC.UpdateData();
- ultraGridBillM.UpdateData();
- UltraGridRow ugr1 = ultraGridBillM.ActiveRow;
- if (ugr1 == null) return;
- int count = 0;
- ArrayList list1 = new ArrayList();
- foreach (UltraGridRow row in ultraGridBillM.Rows)
- {
- if (Convert.ToBoolean(row.Cells["CHC"].Text) == true)
- {
- if (row.Cells["saleOrg"].Text != "100102")
- {
- MessageUtil.ShowTips("请选择要国际贸易部的提单!");
- return;
- }
- count += 1;
- ArrayList list = new ArrayList();
- list.Add(row.Cells["BillNo"].Value.ToString());
- list.Add(row.Cells["Realinvoiceno1"].Text);
- list1.Add(list);
- }
- }
- if (count == 0)
- {
- MessageUtil.ShowTips("请选择要修改提单信息!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否修改结算状态") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "UpdateRealinvoiceno1";
- ccp.ServerParams = new object[] { list1 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1) return;
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- DoQuery();
- }
- }
- /// <summary>
- /// 修改发货去向
- /// </summary>
- private void UpdateDelvryWhereabouts()
- {
- ultraGridBillC.UpdateData();
- ultraGridBillM.UpdateData();
- UltraGridRow ugr1 = ultraGridBillM.ActiveRow;
- if (ugr1 == null) return;
- int count = 0;
- ArrayList list1 = new ArrayList();
- foreach (UltraGridRow row in ultraGridBillM.Rows)
- {
- if (Convert.ToBoolean(row.Cells["CHC"].Text) == true)
- {
- count += 1;
- ArrayList list = new ArrayList();
- list.Add(row.Cells["BillNo"].Value.ToString());
- list.Add(row.Cells["DelvryWhereabouts"].Text);
- list1.Add(list);
- }
- }
- if (count == 0)
- {
- MessageUtil.ShowTips("请选择要修改提单信息!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否修改发货去向") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "UpdateDelvryWhereabouts";
- ccp.ServerParams = new object[] { list1 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1) return;
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- DoQuery();
- }
- }
- private void Export()
- {
- if (ultraTabControl1.SelectedTab.Key.Equals("0"))
- {
- GridHelper.ulGridToExcel(ultraGridSendPlan, "计划信息");
- }
- else
- {
- int count = 0;
- List<string> _billNo = new List<string>();
- foreach (UltraGridRow ugr in ultraGridBillM.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- count += 1;
- _billNo.Add(ugr.Cells["BillNo"].Text.Trim());
- }
- }
- if (count == 0)
- {
- MessageUtil.ShowTips("请选择需要导出的提单!");
- return;
- }
- FrmBillDiaLog fpdc = new FrmBillDiaLog(_billNo.ToArray(), ob);
- fpdc.AutoSize = true;
- fpdc.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fpdc.Text = "导出提单信息";
- fpdc.ShowDialog();
- }
- }
- /// <summary>
- /// 绑定下拉框数据
- /// </summary>
- private void DoInitComDrop()
- {
- //订货单位
- BaseHelper.InitOrderUnit(ComRecive, _salgPersion, this.ob);
- BaseHelper.InitOrderUnit(ComReceiv1, _salgPersion, this.ob);
- //收货单位
- BaseHelper.InitReceivingUnit(ComCustomer, _salgPersion, this.ob);
- BaseHelper.InitReceivingUnit(ComCustomer1, _salgPersion, this.ob);
- //专用线
- YdmBaseClass.InitComboEditor(ComSpcl1, "com.steering.pss.ydm.pipeleavefactory.FrmPipeSendList.queryPrivateSid", "SPCL_LN_NO", ob, false);
- YdmBaseClass.InitComboEditor(ComSpcl, "com.steering.pss.ydm.pipeleavefactory.FrmPipeSendList.queryPrivateSid", "SPCL_LN_NO", ob, false);
- //到站
- YdmBaseClass.InitComboEditor(ComStation1, "com.steering.pss.ydm.pipeleavefactory.FrmPipeSendList.queryArriveStation", "STATION_NO", ob, false);
- YdmBaseClass.InitComboEditor(ComStation, "com.steering.pss.ydm.pipeleavefactory.FrmPipeSendList.queryArriveStation", "STATION_NO", ob, false);
- }
- /// <summary>
- /// Checkbox 选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Chc_CheckedChanged(object sender, EventArgs e)
- {
- //发运计划
- if (ChcApplyTime.Checked) { ComYear.Enabled = true; ComMonth.Enabled = true; } else { ComYear.Enabled = false; ComMonth.Enabled = false; }
- if (ChcOrderNo.Checked) { TxtOrderNo.Enabled = true; } else { TxtOrderNo.Enabled = false; }
- if (ChcPlanNo.Checked) { TxtPlanNo.Enabled = true; } else { TxtPlanNo.Enabled = false; }
- if (ChcStation.Checked) { ComStation.Enabled = true; } else { ComStation.Enabled = false; }
- if (ChcSpcl.Checked) { ComSpcl.Enabled = true; } else { ComSpcl.Enabled = false; }
- if (ChcRecive.Checked) { ComRecive.Enabled = true; } else { ComRecive.Enabled = false; }
- if (ChcCustomer.Checked) { ComCustomer.Enabled = true; } else { ComCustomer.Enabled = false; }
- if (ChcStatus.Checked) { ComStatus.Enabled = true; } else { ComStatus.Enabled = false; }
- if (ChcBillNo.Checked) { TxtBillNo.Enabled = true; } else { TxtBillNo.Enabled = false; }
- //提单
- if (ChcBillTime.Checked) { billNoStime.Enabled = true; BillNoEtime.Enabled = true; } else { billNoStime.Enabled = false; BillNoEtime.Enabled = false; }
- if (ChcBillNo1.Checked) { TxtBillNo1.Enabled = true; } else { TxtBillNo1.Enabled = false; }
- if (ChcPlanNo1.Checked) { TxtPlanNo1.Enabled = true; } else { TxtPlanNo1.Enabled = false; }
- if (ChcReceiv1.Checked) { ComReceiv1.Enabled = true; } else { ComReceiv1.Enabled = false; }
- if (ChcSpcl1.Checked) { ComSpcl1.Enabled = true; } else { ComSpcl1.Enabled = false; }
- if (ChkStation1.Checked) { ComStation1.Enabled = true; } else { ComStation1.Enabled = false; }
- if (ChcCustomer1.Checked) { ComCustomer1.Enabled = true; } else { ComCustomer1.Enabled = false; }
- if (ChcOrderNo1.Checked) { TxtOrderNo1.Enabled = true; } else { TxtOrderNo1.Enabled = false; }
- if (ChcBillStatus.Checked) { ComBillStratus.Enabled = true; } else { ComBillStratus.Enabled = false; }
- if (ChcReceiv1.Checked) { ComReceiv1.Enabled = true; } else { ComReceiv1.Enabled = false; }
- }
- /// <summary>
- /// 初始化提单号
- /// </summary>
- /// <param name="sendPlanNo">计划号</param>
- private void InitBillNo(string sendPlanNo)
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.getBillNoBySendPlanNo", new object[] { sendPlanNo, "110502" }, this.ob);
- DataRow dr = dt.NewRow();
- dr["BILL_NO"] = "";
- dr["BILL_NO"] = "";
- dt.Rows.Add(dr);
- ComBillNo.DataSource = dt;
- ComBillNo.DisplayMember = "BILL_NO";
- ComBillNo.ValueMember = "BILL_NO";
- }
- /// <summary>
- /// 发运计划查询条件
- /// </summary>
- /// <returns></returns>
- private ArrayList QuerySendPlanCondition()
- {
- ArrayList param = new ArrayList();
- string applytime = "";
- string orderNo = "";
- string sendPlanNo = "";
- string station = "";
- string spcl = "";
- string reciveName = "";
- string customerName = "";
- string billNo = "";
- string status = "";
- if (ChcApplyTime.Checked && ComYear.Value != null && ComMonth.Value != null)
- {
- applytime = ComYear.Value.ToString() + ComMonth.Value.ToString();
- }
- if (ChcOrderNo.Checked)
- {
- orderNo = TxtOrderNo.Text.Trim();
- }
- if (ChcPlanNo.Checked)
- {
- sendPlanNo = TxtPlanNo.Text.Trim();
- }
- if (ChcStation.Checked && ComStation.Value != null)
- {
- station = ComStation.Value.ToString();
- }
- if (ChcSpcl.Checked && ComSpcl.Value != null)
- {
- spcl = ComSpcl.Value.ToString();
- }
- if (ChcRecive.Checked)
- {
- reciveName = ComRecive.Text.Trim();
- }
- if (ChcCustomer.Checked)
- {
- customerName = ComCustomer.Text.Trim();
- }
- if (ChcBillNo.Checked)
- {
- billNo = TxtBillNo.Text.Trim();
- }
- if (ChcStatus.Checked && ComStatus.Value != null)
- {
- status = ComStatus.Value.ToString().Trim();
- }
- if (!ChcApplyTime.Checked && orderNo.Equals("") && sendPlanNo.Equals("") && station.Equals("") && spcl.Equals("") && reciveName.Equals("") && customerName.Equals("") && status.Equals("") && billNo.Equals(""))
- {
- errMessage = "请至少选择一个查询条件!";
- return null;
- }
- param.Add(applytime);
- param.Add(orderNo);
- param.Add(sendPlanNo);
- param.Add(station);
- param.Add(spcl);
- param.Add(reciveName);
- param.Add(customerName);
- param.Add(billNo);
- param.Add(status);
- return param;
- }
- /// <summary>
- /// 查询发运计划
- /// </summary>
- private void QuerySendPlan()
- {
- ArrayList param = QuerySendPlanCondition();
- if (param == null)
- {
- MessageUtil.ShowTips(errMessage);
- return;
- }
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.querySendPlan", new object[] { param, this.ValidDataPurviewIds }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
- if (dt.Rows.Count == 0)
- {
- GridHelper.ClearGridDataSourceData(ultraGridOrder);
- GridHelper.ClearGridDataSourceData(ultraGridSourse);
- }
- }
- /// <summary>
- /// 查询合同信息
- /// </summary>
- /// <param name="sendPlanNo">计划号</param>
- /// <param name="sendDayPlanNo">日计划号</param>
- private void QueryOrderInfo(string sendPlanNo)
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.queryOrderInfo", new object[] { sendPlanNo }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable2, true);
- }
- /// <summary>
- /// 查询仓库资源信息
- /// </summary>
- /// <param name="ordPk">合同主键</param>
- /// <param name="ordLnPk">合同行主键</param>
- /// <param name="ordLnDlyPk">交货行主键</param>
- private void QuerySourse(UltraGridRow row,string ordPk, string ordLnPk, string ordLnDlyPk)
- {
-
- List<MatInfoEntity> listSourse = EntityHelper.GetData<MatInfoEntity>("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.querySourse", new object[] { ordPk, ordLnPk, ordLnDlyPk }, this.ob);
- matInfoEntityBindingSource.DataSource = listSourse;
- UltraGridColumn[] col = new UltraGridColumn[] { ultraGridSourse.DisplayLayout.Bands[0].Columns["StdName"], ultraGridSourse.DisplayLayout.Bands[0].Columns["CHC"],
- ultraGridSourse.DisplayLayout.Bands[0].Columns["ActCount"], ultraGridSourse.DisplayLayout.Bands[0].Columns["YbCount"],ultraGridSourse.DisplayLayout.Bands[0].Columns["Vstel"] };
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGridSourse, col);
- foreach (UltraGridRow ugr in ultraGridSourse.Rows)
- {
- ugr.Cells["Vstel"].Value = ugr.Cells["StorageNo"].Value.ToString();
- }
- if (row.Cells["ORDER_UNIT"].Text.Equals("米") || row.Cells["ORDER_UNIT"].Text.Equals("英尺"))
- {
- foreach (UltraGridRow ugr1 in ultraGridSourse.Rows)
- {
- ugr1.Cells["SendNum"].Value = ugr1.Cells["ActLen"].Value.ToString();
- ugr1.Cells["SendNum"].Appearance.BackColor = Color.FromArgb(255, 255, 192);
- ugr1.Cells["SendNum"].Appearance.BackHatchStyle = BackHatchStyle.None;
- ugr1.Cells["SendNum"].Activation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- }
- }
- else if (row.Cells["ORDER_UNIT"].Text.Equals("支") || row.Cells["ORDER_UNIT"].Text.Equals("个"))
- {
- foreach (UltraGridRow ugr1 in ultraGridSourse.Rows)
- {
- ugr1.Cells["SendNum"].Value = ugr1.Cells["ActCount"].Value.ToString();
- ugr1.Cells["SendNum"].Appearance.BackColor = Color.Transparent;
- ugr1.Cells["SendNum"].Appearance.BackHatchStyle = BackHatchStyle.Default;
- ugr1.Cells["SendNum"].Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
- }
- }
- else
- {
- foreach (UltraGridRow ugr1 in ultraGridSourse.Rows)
- {
- ugr1.Cells["SendNum"].Appearance.BackColor = Color.Transparent;
- ugr1.Cells["SendNum"].Appearance.BackHatchStyle = BackHatchStyle.Default;
- ugr1.Cells["SendNum"].Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
- ugr1.Cells["SendNum"].Value = ugr1.Cells["ActWeight"].Value.ToString();
- }
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- private void DoQuery()
- {
- if (ultraTabControl1.SelectedTab.Key.Equals("0"))
- {
- if (!ValidQuery()) return;
- QuerySendPlan();
- }
- else
- {
- if (!ValidQuery1()) return;
- QueryBillMInfo();
- }
- }
- private void ultraGridSendPlan_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow ugr = ultraGridSendPlan.ActiveRow;
- if (ugr == null)
- {
- ComBillNo.DataSource = null;
- return;
- }
- else
- {
- string sendPlanNo = ugr.Cells["SEND_PLAN_NO"].Text;
- QueryOrderInfo(sendPlanNo);
- InitBillNo(sendPlanNo);
- BaseHelper.UltraGridLocation(ultraGridOrder, new string[] { "ORD_LN_DLY_PK" }, new string[] { _ordLnDlyPk });
- _ordLnDlyPk = "";
- }
- PraFlag.Checked = false;
- }
- private void ultraGridOrder_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow ugr = ultraGridOrder.ActiveRow;
- if (ugr == null)
- {
- return;
- }
- else
- {
- if (ultraGridSendPlan.ActiveRow.Cells["SUPPLY_UNIT"].Value.ToString() != "120504")
- {
- ChcVirtual.Checked = false;
- if (!string.IsNullOrWhiteSpace(ugr.Cells["OUTBOUND_CALCULATE"].Text.ToString2()))
- {
- PraFlag.Enabled = false;
- if (!ugr.Cells["OUTBOUND_CALCULATE"].Text.ToString2().Equals("0"))
- {
- PraFlag.Checked = true;
- }
- }
- else
- {
- PraFlag.Enabled = true;
- PraFlag.Checked = false;
- }
- }
- string ordPk = ugr.Cells["ORD_PK"].Text;
- string ordLnPk = ugr.Cells["ORD_LN_PK"].Text;
- string ordLnDlyPk = ugr.Cells["ORD_LN_DLY_PK"].Text;
- //if (!ugr.Cells["PRD_CLS"].Text.Equals("405005"))//判断是否坯子
- //{
- ultraGridPipeMat.Visible = false;
- ultraGridSourse.Visible = true;
- QuerySourse(ugr, ordPk, ordLnPk, ordLnDlyPk);
- BaseHelper.UltraGridLocation(ultraGridSourse, new string[] { "OrdLnDlyPk" }, new string[] { _ordLnDlyPkSoure });
- //}
- //else
- //{
- // ultraGridPipeMat.Visible = true;
- // ultraGridSourse.Visible = false;
- // QueryPipeMat(ugr, ordLnDlyPk);
- // BaseHelper.UltraGridLocation(ultraGridPipeMat, new string[] { "OrdLnDlyPk" }, new string[] { _ordLnDlyPkSoure });
- //}
- _ordLnDlyPkSoure = "";
- }
- ultraGroupBox4.Text = "资源信息区";
- }
- /// <summary>
- /// 查询管坯库存
- /// </summary>
- /// <param name="row"></param>
- /// <param name="ordLnDlyPk"></param>
- private void QueryPipeMat(UltraGridRow row, string ordLnDlyPk)
- {
- EntityHelper.ShowGridCaption<PipeMatGpMEntity>(ultraGridPipeMat.DisplayLayout.Bands[0]);
- YdmBaseClass.InitComboEditor(uceVstel, "com.steering.pss.ydm.pipemanage.CorePipeInTemp.getStorageDetail", "STORAGE_NO", this.ob, false);
- YdmBaseClass.BindColumn(uceVstel, "Vstel", this.Controls, this.ultraGridPipeMat, 0);
- BaseHelper.setUltraGridColumnMaxInput(ultraGridPipeMat, new string[] { "ActWeight", "YbWeight", "KcWeight", "SendNum" });
- List<PipeMatGpMEntity> listSourse = EntityHelper.GetData<PipeMatGpMEntity>("com.steering.pss.ydm.acasleavefactory.CoreCasCarBill.queryPipeMat", new object[] { ordLnDlyPk }, this.ob);
- pipeMatGpMbindingSource.DataSource = listSourse;
- UltraGridColumn[] col = new UltraGridColumn[] {ultraGridPipeMat.DisplayLayout.Bands[0].Columns["CHK"],
- ultraGridPipeMat.DisplayLayout.Bands[0].Columns["ActCount"], ultraGridPipeMat.DisplayLayout.Bands[0].Columns["YbCount"],ultraGridPipeMat.DisplayLayout.Bands[0].Columns["Vstel"] };
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGridPipeMat, col);
- foreach (UltraGridRow ugr in ultraGridPipeMat.Rows)
- {
- ugr.Cells["Vstel"].Value = ugr.Cells["StorageNo"].Value.ToString();
- }
- if (row.Cells["ORDER_UNIT"].Text.Equals("米") || row.Cells["ORDER_UNIT"].Text.Equals("英尺"))
- {
- foreach (UltraGridRow ugr1 in ultraGridPipeMat.Rows)
- {
- ugr1.Cells["SendNum"].Appearance.BackColor = Color.FromArgb(255, 255, 192);
- ugr1.Cells["SendNum"].Appearance.BackHatchStyle = BackHatchStyle.None;
- ugr1.Cells["SendNum"].Activation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- }
- }
- else if (row.Cells["ORDER_UNIT"].Text.Equals("支") || row.Cells["ORDER_UNIT"].Text.Equals("个"))
- {
- foreach (UltraGridRow ugr1 in ultraGridSourse.Rows)
- {
- ugr1.Cells["SendNum"].Value = ugr1.Cells["ActCount"].Value.ToString();
- ugr1.Cells["SendNum"].Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
- }
- }
- else
- {
- foreach (UltraGridRow ugr1 in ultraGridPipeMat.Rows)
- {
- ugr1.Cells["SendNum"].Appearance.BackColor = Color.FromArgb(255, 255, 192);
- ugr1.Cells["SendNum"].Appearance.BackHatchStyle = BackHatchStyle.None;
- ugr1.Cells["SendNum"].Activation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ugr1.Cells["SendNum"].Value = ugr1.Cells["ActWeight"].Value.ToString();
- }
- }
- }
- /// <summary>
- /// 提单查询条件
- /// </summary>
- /// <returns>ArrayList</returns>
- private ArrayList QueryBillCondition()
- {
- ArrayList param = new ArrayList();
- string billStime = "2000-01-01 00:00:00";
- string billEtime = "2100-12-30 00:00:00";
- string orderNo = "";
- string sendPlanNo = "";
- string station = "";
- string spcl = "";
- string reciveName = "";
- string customerName = "";
- string billNo = "";
- string status = "";
- if (ChcBillTime.Checked)
- {
- if (billNoStime.Value == null || BillNoEtime.Value == null || billNoStime.Value > BillNoEtime.Value)
- {
- errMessage = "请选择正确的提单日期区间!";
- return null;
- }
- billStime = billNoStime.Value.ToString();
- billEtime = BillNoEtime.Value.ToString();
- }
- if (ChcOrderNo1.Checked)
- {
- orderNo = TxtOrderNo1.Text.Trim();
- }
- if (ChcPlanNo1.Checked)
- {
- sendPlanNo = TxtPlanNo1.Text.Trim();
- }
- if (ChkStation1.Checked && ComStation1.Value != null)
- {
- station = ComStation1.Value.ToString();
- }
- if (ChcSpcl.Checked && ComSpcl.Value != null)
- {
- spcl = ComSpcl.Value.ToString();
- }
- if (ChcReceiv1.Checked)
- {
- reciveName = ComReceiv1.Text.Trim();
- }
- if (ChcCustomer1.Checked)
- {
- customerName = ComCustomer1.Text.Trim();
- }
- if (ChcBillNo1.Checked)
- {
- billNo = TxtBillNo1.Text.Trim();
- }
- if (ChcBillStatus.Checked && ComBillStratus.Value != null)
- {
- status = ComBillStratus.Value.ToString().Trim();
- }
- //if (!ChcBillTime.Checked && orderNo.Equals("") && sendPlanNo.Equals("") && station.Equals("") && spcl.Equals("") && reciveName.Equals("") && customerName.Equals("") && status.Equals("") && billNo.Equals(""))
- //{
- // errMessage = "请至少选择一个查询条件!";
- // return null;
- //}
- param.Add(billStime);
- param.Add(billEtime);
- param.Add(orderNo);
- param.Add(sendPlanNo);
- param.Add(station);
- param.Add(spcl);
- param.Add(reciveName);
- param.Add(customerName);
- param.Add(billNo);
- param.Add(status);
- return param;
- }
- /// <summary>
- /// 查询提单信息
- /// </summary>
- private void QueryBillMInfo()
- {
- ArrayList param = QueryBillCondition();
- if (param == null)
- {
- MessageUtil.ShowTips(errMessage);
- return;
- }
- //string prdCls = ComTransitTyp.Value.ToString();
- DataSourceList<YdmZcBillMEntity> listBillM = EntityHelper.GetData<YdmZcBillMEntity>("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.queryBillM", new object[] { param, this.ValidDataPurviewIds }, this.ob);
- ydmZcBillMEntityBindingSource.DataSource = listBillM;
- if (listBillM == null || listBillM.Count == 0)
- {
- QueryBillCInfo("");
- }
- }
- private DataSourceList<YdmZcBillCEntity> listBillC;
- /// <summary>
- /// 查询提单从表信息
- /// </summary>
- /// <param name="billNo"></param>
- private void QueryBillCInfo(String billNo)
- {
- listBillC = EntityHelper.GetData<YdmZcBillCEntity>("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.queryBillC", new object[] { billNo }, this.ob);
- ydmZcBillCEntityBindingSource.DataSource = listBillC;
- listBillC.AcceptChanges();
- foreach (UltraGridRow ugr in ultraGridBillC.Rows)
- {
- ugr.Cells["CANCELDOWN"].Value = "撤销";
- }
- }
- private void ultraGridBillM_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null)
- {
- return;
- }
- string billNo = ugr.Cells["BillNo"].Text;
- QueryBillCInfo(billNo);
- }
- /// <summary>
- /// 验证提单量
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGridSourse_CellChange(object sender, CellEventArgs e)
- {
- UltraGridRow urg = ultraGridOrder.ActiveRow;
- if (e.Cell.Column.Key.Equals("ActCount"))
- {
- if (e.Cell.Row.Cells["ActCount"].Value == null)
- {
- e.Cell.Row.Cells["ActCount"].Value = "0";
- e.Cell.Row.Cells["ActWeight"].Value = "0";
- e.Cell.Row.Cells["ActLen"].Value = "0";
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = 0;
- }
- }
- else
- {
- ultraGridSourse.UpdateData();
- string actCount = e.Cell.Row.Cells["ActCount"].Value.ToString();
- if (!StringUtil.IsInt(actCount) || actCount == "0")
- {
- e.Cell.Row.Cells["ActCount"].Value = "0";
- e.Cell.Row.Cells["ActWeight"].Value = "0";
- e.Cell.Row.Cells["ActLen"].Value = "0";
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = 0;
- }
- }
- else
- {
- MatInfoEntity matInfoEntity = (MatInfoEntity)ultraGridSourse.ActiveRow.ListObject;
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.checkMatWeight", new object[] { matInfoEntity }, this.ob);
- if (dt != null && dt.Rows.Count > 0)
- {
- e.Cell.Row.Cells["ActWeight"].Value = dt.Rows[0][0].ToString();
- e.Cell.Row.Cells["ActCount"].Value = dt.Rows[0][1].ToString();
- e.Cell.Row.Cells["ActLen"].Value = dt.Rows[0][2].ToString();
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = dt.Rows[0][0].ToString();
- }
- }
- else
- {
- e.Cell.Row.Cells["ActCount"].Value = "0";
- e.Cell.Row.Cells["ActWeight"].Value = "0";
- e.Cell.Row.Cells["ActLen"].Value = "0";
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = 0;
- }
- }
- }
- }
- }
- if (e.Cell.Column.Key.Equals("SendNum"))
- {
- if (e.Cell.Row.Cells["SendNum"].Value == null)
- {
- e.Cell.Row.Cells["SendNum"].Value = "0";
- }
- else
- {
- ultraGridSourse.UpdateData();
- string actLen = e.Cell.Row.Cells["SendNum"].Value.ToString();
- if (!StringUtil.IsFloat(actLen) || actLen == "0")//actCount == "" || int.Parse(actCount)==0
- {
- e.Cell.Row.Cells["SendNum"].Value = "0";
- }
- }
- }
- string storage = "";
- foreach (UltraGridRow ugr1 in ultraGridSourse.Rows)
- {
- if (Convert.ToBoolean(ugr1.Cells["CHC"].Text) == true)
- {
- storage = ugr1.Cells["StorageNo"].Value.ToString();
- }
- }
- double count = 0;
- double weght = 0;
- double len = 0;
- double send = 0;
- ultraGroupBox4.Text = "资源信息区";
- int i = 0;
- foreach (UltraGridRow ugr in ultraGridSourse.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- if (storage != ugr.Cells["StorageNo"].Value.ToString())
- {
- i++;
- }
- ugr.Cells["VstelDesc"].Value = ugr.Cells["Vstel"].Text;
- count += double.Parse(ugr.Cells["ActCount"].Value.ToString());
- weght += double.Parse(ugr.Cells["ActWeight"].Value.ToString());
- len += double.Parse(ugr.Cells["ActLen"].Value.ToString());
- send += double.Parse(ugr.Cells["SendNum"].Value.ToString());
- }
- }
- //if (i > 0)
- //{
- // MessageUtil.ShowTips("您所选择的炉出库地点不一致,不能进行此操作?");
- // e.Cell.Row.Cells["CHC"].Value = false;
- // return;
-
- //}
- ultraGroupBox4.Text = ultraGroupBox4.Text + " 支:" + count + " 吨:" + weght.ToString("f3") + " 长度:" + len.ToString("f3") + " 实发数:" + send.ToString("f3");
- //if (e.Cell.Column.Key.Equals("Vstel"))
- //{
- // e.Cell.Row.Cells["VstelDesc"].Value = e.Cell.Row.Cells["Vstel"].Text;
- //}
- }
- /// <summary>
- /// 新增提单
- /// </summary>
- private void DoAddBill()
- {
- ultraGridSourse.UpdateData();
- ultraGridPipeMat.UpdateData();
- UltraGridRow ugrSendPlan = ultraGridSendPlan.ActiveRow;
- UltraGridRow ugrOrder = ultraGridOrder.ActiveRow;
-
- IQueryable<UltraGridRow> ugrMatNo = ultraGridPipeMat.Rows.AsQueryable().Where(" CHK = 'True'");
- IQueryable<UltraGridRow> ugrSourses = ultraGridSourse.Rows.AsQueryable().Where(" CHC = 'True'");
- //if (ugrOrder.Cells["PRD_CLS"].Text.Equals("405005"))//判断是否坯子
- //{
- // if (ugrSendPlan == null || ugrOrder == null || ugrMatNo.Count() == 0)
- // {
- // MessageUtil.ShowTips("请选择生成提货单的资源信息!");
- // return;
- // }
- //}
- //else
- //{
- if (ugrSendPlan == null || ugrOrder == null || ugrSourses.Count() == 0)
- {
- MessageUtil.ShowTips("请选择生成提货单的资源信息!");
- return;
- }
- //}
- string producName = ugrOrder.Cells["PRODUCNAME"].Text;
- string specName = ugrOrder.Cells["SPEC_NAME"].Text;
- string stdName = ugrOrder.Cells["STD_NAME"].Text;
- string steeName = ugrOrder.Cells["STEELNAME"].Text;
- string modelNmae = ugrOrder.Cells["MODEL_DESC"].Text;
- string stdSty = ugrOrder.Cells["STD_STYLE_DESC"].Text;
- string changpx = producName + stdSty + steeName + specName + modelNmae;//管
- string pipe = producName + specName + stdName;//坯
- string billNo = ComBillNo.Text.Trim();
- string virtualFlag = "1";
- if (ChcVirtual.Checked)
- {
- virtualFlag = "2";
- }
- string strPraFlag = "0";
- if (PraFlag.Checked)
- {
- strPraFlag = "1";
- }
- string plineName = "";
- //验证提单号
- if (!billNo.Equals(""))
- {
- DataTable dt = (DataTable)ComBillNo.DataSource;
- DataRow[] drs = dt.Select("BILL_NO =" + "'" + billNo + "'");
- if (drs == null || drs.Count() == 0)
- {
- return;
- }
- string beVirtualFlag = drs[0]["LOADVEHICLE_TYPE"].ToString();
- plineName = drs[0]["LOADVEHICLE_TYPE"].ToString();
- if (virtualFlag.Equals("1") && !virtualFlag.Equals(beVirtualFlag))
- {
- MessageUtil.ShowTips("实际提货单不能追加虚拟提货单类型的信息!");
- return;
- }
- if (virtualFlag.Equals("2") && !virtualFlag.Equals(beVirtualFlag))
- {
- MessageUtil.ShowTips("虚拟提货单不能追加实际提货单类型的信息!");
- return;
- }
- }
- if (ugrOrder.Cells["ORDER_NO"].Text.Equals(""))
- {
- MessageUtil.ShowTips("合同号不能为空");
- return;
- }
- if (BillBtime.Value == null || BillEtime.Value == null || BillBtime.Value > BillEtime.Value)
- {
- MessageUtil.ShowTips("请选择正确的提货单开始/结束时间!");
- return;
- }
- string sendPlanNo = ugrSendPlan.Cells["SEND_PLAN_NO"].Text;
- string ordPk = ugrOrder.Cells["ORD_PK"].Text;
- string ordLnPk = ugrOrder.Cells["ORD_LN_PK"].Text;
- string ordLnDlyPk = ugrOrder.Cells["ORD_LN_DLY_PK"].Text;
- string billBtime = BillBtime.Value.ToString("yyyy-MM-dd");
- string billEtime = BillEtime.Value.ToString("yyyy-MM-dd");
- ArrayList paramA = new ArrayList();
- paramA.Add(billNo);
- paramA.Add(sendPlanNo);
- paramA.Add(ordPk);
- paramA.Add(ordLnPk);
- paramA.Add(ordLnDlyPk);
- paramA.Add(UserInfo.GetUserName());
- paramA.Add(UserInfo.GetDeptid());
- paramA.Add(UserInfo.GetDepartment());
- paramA.Add(virtualFlag);
- paramA.Add(billBtime);
- paramA.Add(billEtime);
- ArrayList paramB = new ArrayList();
- DataTable dtOrdLnDlyPk = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.queryOrdLnDlyPkWT", new object[] { ordLnDlyPk }, this.ob);
- double ordWt = 0;//交货行量
- double delMat = 0;
- if (dtOrdLnDlyPk.Rows.Count > 0)
- {
- ordWt = double.Parse(dtOrdLnDlyPk.Rows[0]["WGT_ESTMT"].ToString());
- delMat = double.Parse(dtOrdLnDlyPk.Rows[0]["DELVRY_RANGE_MAX"].ToString());
- }
- DataTable dtBillC = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.queryBillWeight", new object[] { ordLnDlyPk }, this.ob);
- double billWeight = double.Parse(dtBillC.Rows[0]["ACT_WEIGHT"].ToString());
- double wegiht = 0;
- DateTime d1 = DateTime.Now;//当前时间
- DateTime dt1 = Convert.ToDateTime(d1);
- //if (ugrOrder.Cells["PRD_CLS"].Text.Equals("405005"))
- //{
- // foreach (UltraGridRow ugr in ugrMatNo)
- // {
- // PipeMatGpMEntity matInfoEntity = (PipeMatGpMEntity)ugr.ListObject;
- // _ordLnDlyPkSoure = matInfoEntity.OrdLnDlyPk;
- // wegiht += double.Parse(matInfoEntity.ActWeight.ToString());
- // if (matInfoEntity.ActCount.Equals("") || matInfoEntity.ActCount.Equals("0"))
- // {
- // MessageUtil.ShowTips("资源信息可编制量为0,不能生成提单!");
- // return;
- // }
- // if (matInfoEntity.StorageName.Equals("") || matInfoEntity.StorageName.Equals("/"))
- // {
- // MessageUtil.ShowTips("请确认资源信息出库地点!");
- // return;
- // }
- // if (pipe != matInfoEntity.Producname + matInfoEntity.SpecName + matInfoEntity.JudgeStdName)
- // {
- // if (MessageUtil.ShowYesNoAndQuestion("合同产品信息与炉号产品信息不一致,是否继续!") == DialogResult.No) return;
- // }
- // if (ugr.Cells["SendNum"].Text.Equals("0.000"))
- // {
- // MessageUtil.ShowTips("请输入实发数!");
- // return;
- // }
- // DateTime dt2 = Convert.ToDateTime(matInfoEntity.InstockTime);
- // int months = (dt1.Year - dt2.Year) * 12 + (dt1.Month - dt2.Month);
- // if (months > 6)
- // {
- // if (MessageUtil.ShowYesNoAndQuestion("您所选择的炉号信息入库日期与当前日期相隔6个月,是否继续!") == DialogResult.No) return;
- // }
- // paramB.Add(matInfoEntity);
- // }
-
- //}
- //else
- //{
- string plineCode = "";
- foreach (UltraGridRow ugr in ugrSourses)
- {
- MatInfoEntity matInfoEntity = (MatInfoEntity)ugr.ListObject;
- _ordLnDlyPkSoure = matInfoEntity.OrdLnDlyPk;
- wegiht += double.Parse(matInfoEntity.ActWeight.ToString());
- if (matInfoEntity.ActCount.Equals("") || matInfoEntity.ActCount.Equals("0"))
- {
- MessageUtil.ShowTips("资源信息可编制量为0,不能生成提单!");
- return;
- }
- if (matInfoEntity.StorageName.Equals("") || matInfoEntity.StorageName.Equals("/"))
- {
- MessageUtil.ShowTips("请确认资源信息出库地点!");
- return;
- }
- if (changpx != matInfoEntity.Producname + matInfoEntity.StdStyleDesc + matInfoEntity.Steelname + matInfoEntity.SpecName + matInfoEntity.ModelDesc)
- {
- if (MessageUtil.ShowYesNoAndQuestion("合同产品信息与炉号产品信息不一致,是否继续!") == DialogResult.No) return;
- }
- if (ugr.Cells["SendNum"].Text.Trim().Equals("0.000"))
- {
- MessageUtil.ShowTips("请输入实发数!");
- return;
- }
- if (_salgPersion.Length == 1)
- {
- if (!_salgPersion[0].Equals("100102"))
- {
- string plineDepart = "";
- //根据产线产线管理部门
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.queryPlineDepart", new object[] { ugr.Cells["plineCode"].Text.Trim() }, this.ob);
- if (dt.Rows.Count > 0)
- {
- plineDepart = dt.Rows[0]["PROCESS_CODE"].ToString();
- }
- if (plineCode.Equals(""))
- {
- plineCode = plineDepart;
- }
- else
- {
- plineCode = plineCode + "," + plineDepart;
- }
- }
- }
- else
- {
- string plineDepart = "";
- //根据产线产线管理部门
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.queryPlineDepart", new object[] { ugr.Cells["plineCode"].Text.Trim() }, this.ob);
- if (dt.Rows.Count > 0)
- {
- plineDepart = dt.Rows[0]["PROCESS_CODE"].ToString();
- }
- if (plineCode.Equals(""))
- {
- plineCode = plineDepart;
- }
- else
- {
- plineCode = plineCode + "," + plineDepart;
- }
- }
-
- DateTime dt2 = Convert.ToDateTime(matInfoEntity.JudgeResultTime);
- int months = (dt1.Year - dt2.Year) * 12 + (dt1.Month - dt2.Month);
- if (months > 6)
- {
- if (MessageUtil.ShowYesNoAndQuestion("您所选择的炉号信息入库日期与当前日期相隔6个月,是否继续!") == DialogResult.No) return;
- }
- paramB.Add(matInfoEntity);
- }
- if (_salgPersion.Length == 1)
- {
- if (!_salgPersion[0].Equals("100102"))
- {
- if (plineCode.Contains("G") && plineCode.Contains("D"))
- {
- if (MessageUtil.ShowYesNoAndQuestion("选择炉号存在加工和轧管产线,是否继续生成一个提单!") == DialogResult.No) return;
- }
- //if (!billNo.Equals(""))
- //{
- // if (!plineName.Equals(ugr.Cells["plineName"].Text.Trim()))
- // {
- // if (MessageUtil.ShowYesNoAndQuestion("选择炉号产线不一致,是否继续!") == DialogResult.No) return;
- // }
- //}
- }
- }
- else
- {
- //if (!billNo.Equals(""))
- //{
- // if (!plineName.Equals(ugr.Cells["plineName"].Text.Trim()))
- // {
- // if (MessageUtil.ShowYesNoAndQuestion("选择炉号产线不一致,是否继续!") == DialogResult.No) return;
- // }
- //}
- if (plineCode.Contains("G") && plineCode.Contains("D"))
- {
- if (MessageUtil.ShowYesNoAndQuestion("选择炉号存在加工和轧管产线,是否继续生成一个提单!") == DialogResult.No) return;
- }
- }
- //}
- double ordb =ordWt+ ordWt * (delMat / 100);//交货行上限值
- double billW = billWeight + wegiht;
- if (ordb < billW)
- {
- if (MessageUtil.ShowYesNoAndQuestion("生成提单量不能大于交货量上限,交货量为:" + ordWt + "t,交货量上限值为:" + ordb + "t,已生成提单量为:" + billWeight + "t,要生成提单的量为:" + wegiht + "t") == DialogResult.No)
- {
- return;
- }
- }
- if (BillBtime.Value == null || BillEtime.Value == null || BillBtime.Value > BillEtime.Value)
- {
- MessageUtil.ShowWarning("请选择正确的提单开始/结束时间");
- return;
- }
- //定位
- _sendPlanNo = sendPlanNo;
- _ordLnDlyPk = ordLnDlyPk;
- if (MessageUtil.ShowYesNoAndQuestion(billNo.Length == 0 ? "是否新增提货单?" : "是否在原提货单号:" + billNo + "追加提货单信息?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- //if (ugrOrder.Cells["PRD_CLS"].Text.Equals("405005"))
- //{
- // ccp.ServerName = "com.steering.pss.ydm.acasleavefactory.CoreCasCarBill";
- // ccp.MethodName = "doAddBillInfo";
-
- //}
- //else
- //{
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill";
- ccp.MethodName = "doAddBillInfo";
-
- //}
- ccp.ServerParams = new object[] { paramA, paramB, ugrOrder.Cells["ORDER_NO"].Text, ugrOrder.Cells["ORDER_SEQ"].Text, ugrOrder.Cells["DELIVERY_NO"].Text, strPraFlag, ugrSendPlan.Cells["SUPPLY_UNIT"].Text, ugrSendPlan.Cells["SUPPLY_UNIT_DESC"].Text };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception e)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("新增提货单成功!") || ccp.ReturnInfo.Equals("修改提货单成功!"))
- {
- QuerySendPlan();
- BaseHelper.UltraGridLocation(ultraGridSendPlan, new string[] { "SEND_PLAN_NO" }, new string[] { _sendPlanNo });
- _sendPlanNo = "";
- }
- }
-
- }
- /// <summary>
- /// 撤销提单
- /// </summary>
- private void DoDelete()
- {
- ultraGridBillM.UpdateData();
- IQueryable<UltraGridRow> checkRows = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (checkRows.Count() == 0)
- {
- MessageUtil.ShowTips("请选择需要撤销的提货单!");
- return;
- }
- ArrayList list = new ArrayList();
- ArrayList pram = new ArrayList();
- foreach (UltraGridRow ugr in checkRows)
- {
- list.Add(ugr.Cells["BillNo"].Text.Trim());
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否撤销提货单?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- //if (ComTransitTyp.Value.ToString().Equals("405005"))
- //{
- // ccp.ServerName = "com.steering.pss.ydm.acasleavefactory.CoreCasCarBill";
- // ccp.MethodName = "updateBill";
- // ccp.ServerParams = new object[] { list, UserInfo.GetUserName(), UserInfo.GetDeptid(), UserInfo.GetDepartment() };
- // ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- //}
- //else
- //{
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "updateBill";
- ccp.ServerParams = new object[] { list, UserInfo.GetUserName(), UserInfo.GetDeptid(), UserInfo.GetDepartment() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- //}
-
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("提单撤销成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 下发
- /// </summary>
- private void DoDown()
- {
- ultraGridBillM.UpdateData();
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- IQueryable<UltraGridRow> ugrs = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (ugrs.Count() == 0)
- {
- MessageUtil.ShowTips("请选择您要操作的数据!");
- return;
- }
- ArrayList param = new ArrayList();
- foreach (UltraGridRow row in ugrs)
- {
- string[] str = new string[2];
- str[0] = row.Cells["BillNo"].Value.ToString();
- str[1] = row.Cells["SendPlanNo"].Value.ToString();
- param.Add(str);
- // 查询提单合同金额
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.getBillOrder", new object[] { row.Cells["BillNo"].Value.ToString() }, ob);
- double price = 0.0;
- string askDesc = "";
- bool next_flag = false;
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- if (!dt.Rows[i]["FST_DRAWEE_UNIT"].ToString2().Equals("120604")) // 天津钢管钢铁贸易有限公司
- {
- next_flag = true;
- continue;
- }
- if (!string.IsNullOrWhiteSpace(dt.Rows[i]["MNY_ASK_DESC"].ToString2())
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("全额排产")
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("付讫发货")
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("全款提货")
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("全款预付")
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("付讫后发货")
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("全额付款提货")
- && !dt.Rows[i]["MNY_ASK_DESC"].ToString2().Contains("发货前支付100%货款"))
- {
- if (MessageBox.Show(dt.Rows[i]["ORDER_NO"].ToString() + "此合同付款要求是:" + dt.Rows[i]["MNY_ASK_DESC"].ToString2() + "是否继续下发?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- next_flag = true;
- continue;
- }
- if (string.IsNullOrWhiteSpace(dt.Rows[i]["BALNCE_PRICE"].ToString2()))
- {
- MessageUtil.ShowTips(dt.Rows[i]["ORDER_NO"].ToString() + "/" + dt.Rows[i]["ORDER_SEQ"].ToString() + ",没有合同价格,请维护合同价格!");
- return;
- }
- price += double.Parse(dt.Rows[0]["MONEY"].ToString3());
- askDesc = dt.Rows[i]["MNY_ASK_DESC"].ToString2();
- }
- if (next_flag)
- {
- continue;
- }
- // 查询账本可发金额
- DataTable dt1 = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.getMoneyByBuyercode", new object[] { row.Cells["StlmtUnitNo"].Value.ToString() }, ob);
- if (dt1.Rows.Count <= 0 || string.IsNullOrWhiteSpace(dt1.Rows[0]["MONEY"].ToString2()))
- {
- MessageUtil.ShowTips(row.Cells["StlmtUnitNM"].Value.ToString() + ",没有可发金额,请维护可发金额!");
- return;
- }
- ArrayList param1 = new ArrayList();
- ArrayList list1 = new ArrayList();
- list1.Add(row.Cells["BillNo"].Value.ToString());
- list1.Add(row.Cells["StlmtUnitNO"].Value.ToString());
- list1.Add(row.Cells["StlmtUnitNM"].Value.ToString());
- list1.Add(dt1.Rows[0]["MONEY"].ToString3());
- list1.Add(price);
- list1.Add(this.UserInfo.GetUserName());
- param1.Add(list1);
- if (double.Parse(dt1.Rows[0]["MONEY"].ToString3()) <= 0)
- {
- if (MessageBox.Show(row.Cells["StlmtUnitNM"].Value.ToString() + ",可发金额(" + dt1.Rows[0]["MONEY"].ToString2() + ")小于等于0!是否确认下发提货单?\n此合同付款要求是:" + askDesc, "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- }
- if (double.Parse(dt1.Rows[0]["MONEY"].ToString3()) < price)
- {
- if (MessageBox.Show(row.Cells["StlmtUnitNM"].Value.ToString() + ",可发金额(" + dt1.Rows[0]["MONEY"].ToString2() + ")小于结算金额(" + price + ")!是否确认下发提货单?\n此合同付款要求是:" + askDesc, "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- }
- if (double.Parse(dt1.Rows[0]["MONEY"].ToString3()) <= 0 || double.Parse(dt1.Rows[0]["MONEY"].ToString3()) < price)
- {
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp1.MethodName = "DoDownLog";
- ccp1.ServerParams = new object[] { param1 };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- }
- }
- if (MessageBox.Show("是否确认下发提货单?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "DoDown";
- ccp.ServerParams = new object[] { param, UserInfo.GetUserName() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("下发成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 撤销下发
- /// </summary>
- private void CancelDown()
- {
- ultraGridBillM.UpdateData();
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- IQueryable<UltraGridRow> ugrs = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (ugrs.Count() == 0)
- {
- MessageUtil.ShowTips("请选择您要撤销下发的提货单!");
- return;
- }
- ArrayList param = new ArrayList();
- foreach (UltraGridRow row in ugrs)
- {
- string[] str = new string[2];
- str[0] = row.Cells["BillNo"].Value.ToString();
- str[1] = row.Cells["SendPlanNo"].Value.ToString();
- _billNo = str[0];
- param.Add(str);
- }
- if (MessageBox.Show("是否确认撤销下发的提货单?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "cancelDown";
- ccp.ServerParams = new object[] { param, UserInfo.GetUserName() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销下发成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 提单划断
- /// </summary>
- private void BillDrawOff()
- {
- ultraGridBillM.UpdateData();
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- IQueryable<UltraGridRow> ugrs = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (ugrs.Count() == 0)
- {
- MessageUtil.ShowTips("请选择您要一次关闭的提货单!");
- return;
- }
- ArrayList param = new ArrayList();
- foreach (UltraGridRow row in ugrs)
- {
- if (row.Cells["LoadvehicleType"].Value.ToString().Equals("实际"))
- {
- MessageUtil.ShowTips("只有虚拟的提货单才能一次关闭!");
- return;
- }
- string billNo = row.Cells["BillNo"].Value.ToString();
- _billNo = billNo;
- param.Add(billNo);
- }
- if (MessageBox.Show("是否提单一次关闭?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "billDrawOff";
- ccp.ServerParams = new object[] { param, UserInfo.GetUserName() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("提单一次关闭成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 取消划断
- /// </summary>
- private void CancelBillDrawOff()
- {
- ultraGridBillM.UpdateData();
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- IQueryable<UltraGridRow> ugrs = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (ugrs.Count() == 0)
- {
- MessageUtil.ShowTips("请选择您要撤销一次关闭的提货单!");
- return;
- }
- ArrayList param = new ArrayList();
- foreach (UltraGridRow row in ugrs)
- {
- if (row.Cells["LoadvehicleType"].Value.ToString().Equals("实际"))
- {
- MessageUtil.ShowTips("只有虚拟的提货单才能撤销一次关闭!");
- return;
- }
- string billNo = row.Cells["BillNo"].Value.ToString();
- _billNo = billNo;
- param.Add(billNo);
- }
- if (MessageBox.Show("是否撤销一次关闭?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "cancelBillDrawOff";
- ccp.ServerParams = new object[] { param, UserInfo.GetUserName() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销一次关闭成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 打印
- /// </summary>
- private void Print()
- {
- string billNo = "";
- UltraGridRow ugr = this.ultraGridBillM.ActiveRow;
- if (ugr == null) { MessageUtil.ShowTips("无数据,请确认!"); return; }
- int count = 0;
- foreach (UltraGridRow row in ultraGridBillM.Rows)
- {
- if (Convert.ToBoolean(row.Cells["CHC"].Text) == true)
- {
- count += 1;
- billNo = ugr.Cells["BillNo"].Text.Trim();
- }
- }
- if (count == 0)
- {
- MessageUtil.ShowTips("请选择要打印的提货单号!");
- return;
- }
- if (count > 1)
- {
- MessageUtil.ShowTips("请勾选一个提货单号打印!");
- return;
- }
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.CorePipeBillOfLadingClose.getBillStatus", new Object[] { ugr.Cells["BillNo"].Text.Trim() }, this.ob);
- if (dt.Rows.Count > 0)
- {
- if (dt.Rows[0]["BILL_STATUS"].ToString().Equals("0"))
- {
- MessageUtil.ShowTips("该提单是编制状态,请下发之后再打印提单!");
- return;
- }
- }
- string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepYdmBill.cpt&op=view" + "&billno=" + billNo;
- string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- ServerHelper.SetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.updatePintFlag", new object[] { time, billNo }, ob);
- FrmDocPrintExcel fBug = new FrmDocPrintExcel(ob, strurl);
- fBug.AutoSize = true;
- fBug.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- // fBug.WindowState = FormWindowState.Maximized;
- fBug.Text = "提货单打印";
- fBug.ShowDialog();
- QueryBillMInfo();
- }
- private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (toolMenu == null) return;
- if (CustomInfo.Equals("1"))
- {
- if (e.Tab.TabControl.SelectedTab.Key.Equals("0"))
- {
- if (toolMenu.Toolbars[0].Tools.Exists("Update")) { toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("Add")) { toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateDelvryWhereabouts")) { toolMenu.Toolbars[0].Tools["UpdateDelvryWhereabouts"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateRealinvoiceno1")) { toolMenu.Toolbars[0].Tools["UpdateRealinvoiceno1"].InstanceProps.Visible = DefaultableBoolean.False; }
- }
- else
- {
- if (toolMenu.Toolbars[0].Tools.Exists("Update")) { toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("Add")) { toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateDelvryWhereabouts")) { toolMenu.Toolbars[0].Tools["UpdateDelvryWhereabouts"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateRealinvoiceno1")) { toolMenu.Toolbars[0].Tools["UpdateRealinvoiceno1"].InstanceProps.Visible = DefaultableBoolean.True; }
- }
- }
- if (CustomInfo.Equals("2"))
- {
- if (toolMenu.Toolbars[0].Tools.Exists("Update")) { toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("Down")) { toolMenu.Toolbars[0].Tools["Down"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("Add")) { toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelDown")) { toolMenu.Toolbars[0].Tools["CancelDown"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("BillDrawOff")) { toolMenu.Toolbars[0].Tools["BillDrawOff"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelBillDrawOff")) { toolMenu.Toolbars[0].Tools["CancelBillDrawOff"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateStoage")) { toolMenu.Toolbars[0].Tools["UpdateStoage"].InstanceProps.Visible = DefaultableBoolean.True; }
- }
- }
- private void frmPipeTrainBill_Shown(object sender, EventArgs e)
- {
- if (CustomInfo.Equals("1"))
- {
- if (toolMenu.Toolbars[0].Tools.Exists("CancelDown")) { toolMenu.Toolbars[0].Tools["CancelDown"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("BillDrawOff")) { toolMenu.Toolbars[0].Tools["BillDrawOff"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelBillDrawOff")) { toolMenu.Toolbars[0].Tools["CancelBillDrawOff"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("Down")) { toolMenu.Toolbars[0].Tools["Down"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("Update")) { toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("Print")) { toolMenu.Toolbars[0].Tools["Print"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateStoage")) { toolMenu.Toolbars[0].Tools["UpdateStoage"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateDelvryWhereabouts")) { toolMenu.Toolbars[0].Tools["UpdateDelvryWhereabouts"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("UpdateRealinvoiceno1")) { toolMenu.Toolbars[0].Tools["UpdateRealinvoiceno1"].InstanceProps.Visible = DefaultableBoolean.False; }
- }
- if (CustomInfo.Equals("2"))
- {
- if (toolMenu.Toolbars[0].Tools.Exists("Update")) { toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("Add")) { toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False; }
- }
- }
- /// <summary>
- /// 划分界面
- /// </summary>
- /// <param name="custInfo"></param>
- private void DivideInterface(string custInfo)
- {
- if (custInfo.Equals("2"))
- {
- ultraTabControl1.Tabs[0].Visible = false;
- }
- else
- {
- ultraTabControl1.Tabs[1].Text = "提单信息";
- }
- }
- private void ultraGridSourse_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
- {
- //try
- //{
- // ultraGridSourse.UpdateData();
- // foreach (UltraGridRow row in ultraGridSourse.Rows)
- // {
- // row.Cells["CHC"].Value = row.Selected;
- // }
- //}
- //catch { }
- foreach (UltraGridRow uRow in ultraGridSourse.Selected.Rows)
- {
- if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
- {
- uRow.Cells["CHC"].Value = true;
- }
- }
- string storage = "";
- foreach (UltraGridRow ugr1 in ultraGridSourse.Rows)
- {
- if (Convert.ToBoolean(ugr1.Cells["CHC"].Text) == true)
- {
- storage = ugr1.Cells["StorageNo"].Value.ToString();
- }
- }
- double count = 0;
- double weght = 0;
- double len = 0;
- double send = 0;
- ultraGroupBox4.Text = "资源信息区";
- int i = 0;
- UltraGridRow row = ultraGridSourse.ActiveRow;
- foreach (UltraGridRow ugr in ultraGridSourse.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- if (storage != ugr.Cells["StorageNo"].Value.ToString())
- {
- i++;
- }
- ugr.Cells["VstelDesc"].Value = ugr.Cells["Vstel"].Text;
- count += double.Parse(ugr.Cells["ActCount"].Value.ToString());
- weght += double.Parse(ugr.Cells["ActWeight"].Value.ToString());
- len += double.Parse(ugr.Cells["ActLen"].Value.ToString());
- send += double.Parse(ugr.Cells["SendNum"].Value.ToString());
- }
- }
- //if (i > 0)
- //{
- // MessageUtil.ShowTips("您所选择的炉出库地点不一致,不能进行此操作?");
- // row.Cells["CHC"].Value = false;
- // return;
-
- //}
- ultraGroupBox4.Text = ultraGroupBox4.Text + " 支:" + count + " 吨:" + weght.ToString("f3") + " 长度:" + len.ToString("f3") + " 实发数:" + send.ToString("f3");
- }
- private void ultraGridBillM_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
- {
- // try
- // {
- // ultraGridBillM.UpdateData();
- // foreach (UltraGridRow row in ultraGridBillM.Rows)
- // {
- // row.Cells["CHC"].Value = row.Selected;
- // }
- // }
- // catch { }
- foreach (UltraGridRow uRow in ultraGridBillM.Selected.Rows)
- {
- if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
- {
- uRow.Cells["CHC"].Value = true;
- }
- }
- }
- /// <summary>
- /// 撤销合同
- /// </summary>
- private void CancelDownOrderNo()
- {
- UltraGridRow ugrM = ultraGridBillM.ActiveRow;
- if (ugrM == null)
- {
- return;
- }
- if (!ugrM.Cells["BillStatus"].Text.Equals("提单编制"))
- {
- MessageUtil.ShowTips("提货单号:" + ugrM.Cells["BillNo"].Text + "不是提单编制状态,不能撤销提货单下的合同!");
- return;
- }
- UltraGridRow ugr = ultraGridBillC.ActiveRow;
- if (ugr == null)
- {
- return;
- }
- ArrayList param = new ArrayList();
- param.Add(ugr.Cells["BillNo"].Text);
- param.Add(ugr.Cells["OrdPk"].Text);
- param.Add(ugr.Cells["OrdLnPk"].Text);
- param.Add(ugr.Cells["OrdLnDlyPk"].Text);
- param.Add(ugr.Cells["JudgeStoveNo"].Text);
- param.Add(ugr.Cells["BatchNo"].Text);
- param.Add(UserInfo.GetUserName());
- param.Add(ugr.Cells["GroupNo"].Text);
- param.Add(ugr.Cells["LocationNo"].Text);
- string billNo = ugr.Cells["BillNo"].Text;
- if (MessageUtil.ShowYesNoAndQuestion("是否撤销提货单:" + ugr.Cells["BillNo"].Text + " 下合同:"
- + ugr.Cells["OrderNo"].Text + "/" + ugr.Cells["OrderSeq"].Text + "/" + ugr.Cells["DeliveryNo"].Text
- + "的炉批号:" + ugr.Cells["JudgeStoveNo"].Text + "/" + ugr.Cells["BatchNo"].Text+"/"+ugr.Cells["GroupNo"].Text) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- //if (ComTransitTyp.Value.ToString().Equals("405005"))
- //{
- // ccp.ServerName = "com.steering.pss.ydm.acasleavefactory.CoreCasCarBill";
- // ccp.MethodName = "cancelDownOrderNo";
- //}
- //else
- //{
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill";
- ccp.MethodName = "cancelDownOrderNo";
- //}
- ccp.ServerParams = new object[] { param };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(billNo))
- {
- ugr.Activate();
- return;
- }
- }
- }
- }
- }
- private void ultraGridBillC_ClickCellButton(object sender, CellEventArgs e)
- {
- if (e.Cell.Text.Equals("撤销"))
- {
- CancelDownOrderNo();
- }
- }
- /// <summary>
- /// 按回车键触发查询按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ContPublic_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- {
- DoQuery();
- }
- }
- /// <summary>
- /// 查询时验证必填项
- /// </summary>
- /// <returns></returns>
- private bool ValidQuery()
- {
- if (ChcOrderNo.Checked && string.IsNullOrEmpty(TxtOrderNo.Text.Trim()))
- {
- MessageBox.Show("请输入合同号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcBillNo.Checked && string.IsNullOrEmpty(TxtBillNo.Text.Trim()))
- {
- MessageBox.Show("请输入提货单号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcPlanNo.Checked && string.IsNullOrEmpty(TxtPlanNo.Text.Trim()))
- {
- MessageBox.Show("请输入出厂计划号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcCustomer.Checked && string.IsNullOrEmpty(ComCustomer.Text.Trim()))
- {
- MessageBox.Show("请选择订货单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcRecive.Checked && string.IsNullOrEmpty(ComRecive.Text.Trim()))
- {
- MessageBox.Show("请选择收货单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcStation.Checked && string.IsNullOrEmpty(ComStation.Text.Trim()))
- {
- MessageBox.Show("请选择到站!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcSpcl.Checked && string.IsNullOrEmpty(ComSpcl.Text.Trim()))
- {
- MessageBox.Show("请选择专用线!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- return true;
- }
- /// <summary>
- /// 查询时验证必填项
- /// </summary>
- /// <returns></returns>
- private bool ValidQuery1()
- {
- if (ChcBillTime.Checked)
- {
- if (DataTimeUtil.JudgeTime(DateTime.Parse(billNoStime.Value.ToString()), DateTime.Parse(BillNoEtime.Value.ToString())) == 0)
- {
- MessageUtil.ShowTips("您所选择的日期区域不对,请重新选择!");
- return false;
- }
- }
- if (ChcOrderNo1.Checked && string.IsNullOrEmpty(TxtOrderNo1.Text.Trim()))
- {
- MessageBox.Show("请输入合同号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcBillNo1.Checked && string.IsNullOrEmpty(TxtBillNo1.Text.Trim()))
- {
- MessageBox.Show("请输入提货单号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcPlanNo1.Checked && string.IsNullOrEmpty(TxtPlanNo1.Text.Trim()))
- {
- MessageBox.Show("请输入出厂计划号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcCustomer1.Checked && string.IsNullOrEmpty(ComCustomer1.Text.Trim()))
- {
- MessageBox.Show("请选择订货单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcReceiv1.Checked && string.IsNullOrEmpty(ComReceiv1.Text.Trim()))
- {
- MessageBox.Show("请选择收货单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChkStation1.Checked && string.IsNullOrEmpty(ComStation1.Text.Trim()))
- {
- MessageBox.Show("请选择到站!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (ChcSpcl1.Checked && string.IsNullOrEmpty(ComSpcl1.Text.Trim()))
- {
- MessageBox.Show("请选择专用线!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- return true;
- }
- /// <summary>
- /// 出库地点修改
- /// </summary>
- private void doUpdateStoage()
- {
- ultraGridBillC.UpdateData();
- UltraGridRow ugr = ultraGridBillC.ActiveRow;
- UltraGridRow ugr1 = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- int count = 0;
- ArrayList list1 = new ArrayList();
- foreach (UltraGridRow row in ultraGridBillC.Rows)
- {
- if (Convert.ToBoolean(row.Cells["CHK"].Text) == true)
- {
- count += 1;
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.CorePipeBillOfLadingClose.getBillStatus", new Object[] { row.Cells["BillNo"].Text.Trim() }, this.ob);
- if (dt.Rows.Count == 0) return;
- //if (dt.Rows[0]["LOADVEHICLE_TYPE"].ToString().Equals("1"))
- //{
- // if (!dt.Rows[0]["BILL_STATUS"].ToString().Equals("0"))
- // {
- // MessageUtil.ShowTips("提货单不是编制状态不能修改出库地点!");
- // return;
- // }
- //}
- //else
- //{
- // if (dt.Rows[0]["ISPRECLOSE"].ToString().Equals("2"))
- // {
- // MessageUtil.ShowTips("虚单已对齐,不能进行此操作!");
- // return;
- // }
- string endStatr = "0";
- if (row.Cells["EditFlag"].Text.Trim().Equals("已理货")) { endStatr = "1"; }
- DataTable dt1 = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.getBillCedit", new Object[] { row.Cells["BillNo"].Text.Trim(), row.Cells["JudgeStoveNo"].Text, row.Cells["BatchNo"].Text, row.Cells["GroupNo"].Text, endStatr }, this.ob);
- if (dt1.Rows[0]["EDIT_FLAG"].ToString().Equals("1"))
- {
- MessageUtil.ShowTips("您选择的这炉已理货,不能进行此操作!");
- return;
- }
- //}
- ArrayList list = new ArrayList();
- list.Add(row.Cells["BillNo"].Value.ToString());
- list.Add(row.Cells["JudgeStoveNo"].Value.ToString());
- list.Add(row.Cells["BatchNo"].Value.ToString());
- list.Add(row.Cells["GroupNo"].Value.ToString());
- list.Add(row.Cells["StorageNo"].Value.ToString());
- list.Add(row.Cells["StorageNo"].Text);
- list1.Add(list);
- }
- }
- if (count == 0)
- {
- MessageUtil.ShowTips("请选择要修改出库地点对应炉号!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否修改出库地点") == DialogResult.No) return;
- int update = 0;
- //if (ComTransitTyp.Value.ToString().Equals("405005"))
- //{
- // update = ServerHelper.SetData("com.steering.pss.ydm.acasleavefactory.CoreCasCarBill.updateStoager", new object[] { list1, ugr1.Cells["PlanTransType"].Text }, ob);
- //}
- //else
- //{
- update = ServerHelper.SetData("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.updateStoager", new object[] { list1 }, ob);
- //}
- if (update>0)
- {
- MessageUtil.ShowTips("出库地点修改成功!");
- QueryBillCInfo(ugr1.Cells["BillNo"].Value.ToString());
- }
- }
- /// <summary>
- /// 装车地点修改
- /// </summary>
- private void doUpdateLoad()
- {
- ultraGridBillC.UpdateData();
- UltraGridRow ugr = ultraGridBillC.ActiveRow;
- UltraGridRow ugr1 = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- int count = 0;
- ArrayList list1 = new ArrayList();
- foreach (UltraGridRow row in ultraGridBillC.Rows)
- {
- if (Convert.ToBoolean(row.Cells["CHK"].Text) == true)
- {
- count += 1;
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.CorePipeBillOfLadingClose.getBillStatus", new Object[] { row.Cells["BillNo"].Text.Trim() }, this.ob);
- if (dt.Rows.Count == 0) return;
- string endStatr = "0";
- if (row.Cells["EditFlag"].Text.Trim().Equals("已理货")) { endStatr = "1"; }
- DataTable dt1 = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.CorePipeCarBill.getBillCedit", new Object[] { row.Cells["BillNo"].Text.Trim(), row.Cells["JudgeStoveNo"].Text, row.Cells["BatchNo"].Text, row.Cells["GroupNo"].Text, endStatr }, this.ob);
- if (dt1.Rows[0]["EDIT_FLAG"].ToString().Equals("1"))
- {
- MessageUtil.ShowTips("您选择的这炉已理货,不能进行此操作!");
- return;
- }
- //}
- ArrayList list = new ArrayList();
- list.Add(row.Cells["BillNo"].Value.ToString());
- list.Add(row.Cells["JudgeStoveNo"].Value.ToString());
- list.Add(row.Cells["BatchNo"].Value.ToString());
- list.Add(row.Cells["GroupNo"].Value.ToString());
- list.Add(row.Cells["Vstel"].Value.ToString());
- list.Add(row.Cells["Vstel"].Text.ToString());
- list1.Add(list);
- }
- }
- if (count == 0)
- {
- MessageUtil.ShowTips("请选择要修改装车地点对应炉号!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否修改装车地点") == DialogResult.No) return;
- int update = 0;
-
- update = ServerHelper.SetData("com.steering.pss.ydm.pipeleavefactory.FrmPipeTrainBill.updateLoad", new object[] { list1 }, ob);
- if (update > 0)
- {
- MessageUtil.ShowTips("装车地点修改成功!");
- QueryBillCInfo(ugr1.Cells["BillNo"].Value.ToString());
- }
- }
- private void ultraGridBillC_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
- {
- foreach (UltraGridRow uRow in ultraGridBillC.Selected.Rows)
- {
- if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
- {
- uRow.Cells["CHK"].Value = true;
- }
- }
- }
- private void ultraGridBillC_CellChange(object sender, CellEventArgs e)
- {
- ultraGridBillC.UpdateData();
- listBillC.Change((YdmZcBillCEntity)e.Cell.Row.ListObject);
- }
- private void ultraGridBillM_BeforeCellDeactivate(object sender, CancelEventArgs e)
- {
- if (listBillC.IsChanged)
- {
- if (MessageUtil.ShowYesNoAndQuestion("是否放弃当前编辑?") == DialogResult.No)
- {
- e.Cancel = true;
- }
- }
- }
- private void ultraGridBillM_CellDataError(object sender, CellDataErrorEventArgs e)
- {
- e.RaiseErrorEvent = false;
- }
- /// <summary>
- /// 直接出库
- /// </summary>
- private void doBillOut()
- {
- ultraGridBillM.UpdateData();
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- IQueryable<UltraGridRow> ugrs = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (ugrs.Count() == 0)
- {
- MessageUtil.ShowTips("请选择您要操作的数据!");
- return;
- }
- ArrayList param = new ArrayList();
- ArrayList list = new ArrayList();
- foreach (UltraGridRow row in ugrs)
- {
- string delvaddr = row.Cells["DelvryAddr"].Text;
- if (delvaddr.Equals("客户库-腾飞") || delvaddr.Equals("客户库-宝仓") || delvaddr.Equals("客户库-安利") || delvaddr.Equals("客户库-润德")
- || delvaddr.Equals("客户库-思创") || delvaddr.Equals("客户库-滨城"))
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.FrmOutAutomatic.queryBillC", new object[] { row.Cells["BillNo"].Value.ToString() }, ob);
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- string storage = dt.Rows[i]["STORAGE_NO"].ToString();
- if (!storage.Equals("LAL1") && !storage.Equals("LAL2") && !storage.Equals("LAL3") && !storage.Equals("LBC1") &&
- !storage.Equals("LBC2") && !storage.Equals("LTF1") && !storage.Equals("LZD1") && !storage.Equals("LZT1"))
- {
- if (MessageBox.Show("出库地点与交货地点不一致是否直接出库?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
- }
- }
- }
- }
- string typeTran = "";
- if (row.Cells["PlanTransType"].Value.ToString().Equals("汽运"))
- {
- typeTran = "110501";
- }
- else
- {
- typeTran = "110502";
- }
- string[] str = new string[19];
- str[0] = row.Cells["BillNo"].Value.ToString();
- str[1] = row.Cells["SendPlanNo"].Value.ToString();
- str[2] = management_no;
- str[3] = management_name;
- str[4] = departid;
- str[5] = departname;
- str[6] = row.Cells["SaleOrg"].Value.ToString();
- str[7] = row.Cells["SaleOrgDesc"].Value.ToString();
- str[8] = typeTran;
- str[9] = row.Cells["ReceivNo"].Value.ToString();
- str[10] = row.Cells["ReceivNm"].Value.ToString();
- str[11] = row.Cells["StlmtUnitNo"].Value.ToString();
- str[12] = row.Cells["StlmtUnitNm"].Value.ToString();
- str[13] = row.Cells["StationNo"].Value.ToString();
- str[14] = row.Cells["StationNm"].Value.ToString();
- str[15] = row.Cells["SpclLnNo"].Value.ToString();
- str[16] = row.Cells["SpclLnNm"].Value.ToString();
- str[17] = this.UserInfo.GetUserGroup();//班组
- str[18] = this.UserInfo.GetUserOrder();//班次
- param.Add(str);
- }
- if (MessageBox.Show("是否确认出库?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- //if (ComTransitTyp.Value.ToString().Equals("405005"))
- //{
- // ccp.ServerName = "com.steering.pss.ydm.acasleavefactory.FrmCasOutAutomatic";
- // ccp.MethodName = "addTallyInfo";
- //}
- //else
- //{
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.FrmOutAutomatic";
- ccp.MethodName = "addTallyInfo";
- //}
- ccp.ServerParams = new object[] { param, this.UserInfo.GetUserName() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- if (ccp.ReturnCode == -1) return;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
-
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("出库成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 撤销出库
- /// </summary>
- private void doDeleteBillOut()
- {
- ultraGridBillM.UpdateData();
- UltraGridRow ugr = ultraGridBillM.ActiveRow;
- if (ugr == null) return;
- IQueryable<UltraGridRow> ugrs = ultraGridBillM.Rows.AsQueryable().Where(" CHC = 'True'");
- if (ugrs.Count() == 0)
- {
- MessageUtil.ShowTips("请选择您要操作的数据!");
- return;
- }
- ArrayList param = new ArrayList();
- foreach (UltraGridRow row in ugrs)
- {
- ArrayList parm = new ArrayList();
- parm.Add(row.Cells["BillNo"].Text.Trim());
- DataTable dg = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.FrmOutAutomatic.selectYearMoth", new object[] { parm }, ob);
- if (int.Parse(dg.Rows[0]["ACOUNT"].ToString()) > 0)
- {
- MessageUtil.ShowTips("该提货单【" + row.Cells["BillNo"].Text.Trim() + "】对应的炉批信息已进行结转,不允许撤销!");
- return;
- }
- string[] str = new string[6];
- str[0] = row.Cells["BillNo"].Value.ToString();
- str[1] = row.Cells["SendPlanNo"].Value.ToString();
- str[2] = management_no;
- str[3] = management_name;
- str[4] = departid;
- str[5] = departname;
- param.Add(str);
- }
- if (MessageBox.Show("是否确认撤销出库?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- //if (ComTransitTyp.Value.ToString().Equals("405005"))
- //{
- // ccp.ServerName = "com.steering.pss.ydm.acasleavefactory.FrmCasOutAutomatic";
- // ccp.MethodName = "deleteTallyInfo";
- //}
- //else
- //{
- ccp.ServerName = "com.steering.pss.ydm.pipeleavefactory.FrmOutAutomatic";
- ccp.MethodName = "deleteTallyInfo";
- //}
- ccp.ServerParams = new object[] { param, this.UserInfo.GetUserName() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- if (ccp.ReturnCode == -1) return;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
-
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销出库成功!"))
- {
- QueryBillMInfo();
- foreach (UltraGridRow ugrc in ultraGridBillM.Rows)
- {
- if (ugrc.Cells["BillNo"].Text.Equals(_billNo))
- {
- ugrc.Activate();
- _billNo = "";
- return;
- }
- }
- }
- }
- }
- /// <summary>
- /// 管坯支数
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGridPipeMat_CellChange(object sender, CellEventArgs e)
- {
- UltraGridRow urg = ultraGridOrder.ActiveRow;
- if (e.Cell.Row.Cells["ActCount"].Value == null)
- {
- e.Cell.Row.Cells["ActCount"].Value = "0";
- e.Cell.Row.Cells["ActWeight"].Value = "0";
- e.Cell.Row.Cells["ActLen"].Value = "0";
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = 0;
- }
- }
- else
- {
- ultraGridPipeMat.UpdateData();
- string actCount = e.Cell.Row.Cells["ActCount"].Value.ToString();
- if (!StringUtil.IsInt(actCount) || actCount == "0")
- {
- e.Cell.Row.Cells["ActCount"].Value = "0";
- e.Cell.Row.Cells["ActWeight"].Value = "0";
- e.Cell.Row.Cells["ActLen"].Value = "0";
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = 0;
- }
- }
- else
- {
- PipeMatGpMEntity matpipeEntity = (PipeMatGpMEntity)ultraGridPipeMat.ActiveRow.ListObject;
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.acasleavefactory.CoreCasCarBill.checkMatWeight", new object[] { JSONFormat.Format(matpipeEntity) }, this.ob);
- if (dt != null && dt.Rows.Count > 0)
- {
- e.Cell.Row.Cells["ActWeight"].Value = dt.Rows[0][0].ToString();
- e.Cell.Row.Cells["ActCount"].Value = dt.Rows[0][1].ToString();
- e.Cell.Row.Cells["ActLen"].Value = dt.Rows[0][2].ToString();
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = dt.Rows[0][0].ToString();
- }
- }
- else
- {
- e.Cell.Row.Cells["ActCount"].Value = "0";
- e.Cell.Row.Cells["ActWeight"].Value = "0";
- e.Cell.Row.Cells["ActLen"].Value = "0";
- if (urg.Cells["ORDER_UNIT"].Text.Equals("吨") || urg.Cells["ORDER_UNIT"].Text.Equals("支"))
- {
- e.Cell.Row.Cells["SendNum"].Value = 0;
- }
- }
- }
- }
- if (e.Cell.Column.Key.Equals("SendNum"))
- {
- if (e.Cell.Row.Cells["SendNum"].Value == null)
- {
- e.Cell.Row.Cells["SendNum"].Value = "0";
- }
- else
- {
- ultraGridPipeMat.UpdateData();
- string actLen = e.Cell.Row.Cells["SendNum"].Value.ToString();
- if (!StringUtil.IsFloat(actLen) || actLen == "0")//actCount == "" || int.Parse(actCount)==0
- {
- e.Cell.Row.Cells["SendNum"].Value = "0";
- }
- }
- }
- string storage = "";
- foreach (UltraGridRow ugr1 in ultraGridPipeMat.Rows)
- {
- if (Convert.ToBoolean(ugr1.Cells["CHK"].Text) == true)
- {
- storage = ugr1.Cells["StorageNo"].Value.ToString();
- }
- }
- double count = 0;
- double weght = 0;
- double len = 0;
- ultraGroupBox4.Text = "资源信息区";
- int i = 0;
- foreach (UltraGridRow ugr in ultraGridPipeMat.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Text) == true)
- {
- if (storage != ugr.Cells["StorageNo"].Value.ToString())
- {
- i++;
- }
- ugr.Cells["VstelDesc"].Value = ugr.Cells["Vstel"].Text;
- count += double.Parse(ugr.Cells["ActCount"].Value.ToString());
- weght += double.Parse(ugr.Cells["ActWeight"].Value.ToString());
- len += double.Parse(ugr.Cells["ActLen"].Value.ToString());
- }
- }
- ultraGroupBox4.Text = ultraGroupBox4.Text + " 支:" + count + " 吨:" + weght.ToString("f3") + " 长度:" + len.ToString("f3");
- }
- /// <summary>
- /// 管坯托选
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGridPipeMat_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
- {
- foreach (UltraGridRow uRow in ultraGridPipeMat.Selected.Rows)
- {
- if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
- {
- uRow.Cells["CHK"].Value = true;
- }
- }
- string storage = "";
- foreach (UltraGridRow ugr1 in ultraGridPipeMat.Rows)
- {
- if (Convert.ToBoolean(ugr1.Cells["CHK"].Text) == true)
- {
- storage = ugr1.Cells["StorageNo"].Value.ToString();
- }
- }
- double count = 0;
- double weght = 0;
- double len = 0;
- ultraGroupBox4.Text = "资源信息区";
- int i = 0;
- UltraGridRow row = ultraGridPipeMat.ActiveRow;
- foreach (UltraGridRow ugr in ultraGridPipeMat.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Text) == true)
- {
- if (storage != ugr.Cells["StorageNo"].Value.ToString())
- {
- i++;
- }
- ugr.Cells["VstelDesc"].Value = ugr.Cells["Vstel"].Text;
- count += double.Parse(ugr.Cells["ActCount"].Value.ToString());
- weght += double.Parse(ugr.Cells["ActWeight"].Value.ToString());
- len += double.Parse(ugr.Cells["ActLen"].Value.ToString());
- }
- }
- ultraGroupBox4.Text = ultraGroupBox4.Text + " 支:" + count + " 吨:" + weght.ToString("f3") + " 长度:" + len.ToString("f3");
- }
- private void chkAll_CheckedChanged(object sender, EventArgs e)
- {
- if (chkAll.Checked)
- {
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow uRow in ultraGridSourse.Rows)
- {
- uRow.Cells["CHC"].Value = true;
- }
- }
- else
- {
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow uRow in ultraGridSourse.Rows)
- {
- uRow.Cells["CHC"].Value = false;
- }
- }
- double count = 0;
- double weght = 0;
- double len = 0;
- double send = 0;
- ultraGroupBox4.Text = "资源信息区";
- UltraGridRow row = ultraGridSourse.ActiveRow;
- foreach (UltraGridRow ugr in ultraGridSourse.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- ugr.Cells["VstelDesc"].Value = ugr.Cells["Vstel"].Text;
- count += double.Parse(ugr.Cells["ActCount"].Value.ToString());
- weght += double.Parse(ugr.Cells["ActWeight"].Value.ToString());
- len += double.Parse(ugr.Cells["ActLen"].Value.ToString());
- send += double.Parse(ugr.Cells["SendNum"].Value.ToString());
- }
- }
- ultraGroupBox4.Text = ultraGroupBox4.Text + " 支:" + count + " 吨:" + weght.ToString("f3") + " 长度:" + len.ToString("f3") + " 实发数:" + send.ToString("f3");
- }
- private void cmbAcount_EditorButtonClick(object sender, EditorButtonEventArgs e)
- {
- this.ultraGridSourse.UpdateData();
- UltraGridRow row = this.ultraGridSourse.ActiveRow;
- UltraGridRow ugr = ultraGridOrder.ActiveRow;
- if (row == null)
- {
- return;
- }
- FrmMatNo frm = new FrmMatNo(row, ob);
- frm.ShowDialog();
- if (frm.flag.Equals("1"))
- {
- row.Cells["MatNo"].Value = frm.matNo.TrimEnd(new char[] { ',' }).ToString();
- row.Cells["ActCount"].Value = frm.acount.ToString();
- row.Cells["MeasuringSeq"].Value = frm.mesNo.TrimEnd(new char[] { ',' }).ToString();
- row.Cells["ActWeight"].Value = frm.wgt;
- if (ugr.Cells["ORDER_UNIT"].Text.Trim().Equals("米") || ugr.Cells["ORDER_UNIT"].Text.Trim().Equals("英尺"))
- {
- row.Cells["SendNum"].Value = frm.sumlength;
- }
- else if (ugr.Cells["ORDER_UNIT"].Text.Equals("支") || ugr.Cells["ORDER_UNIT"].Text.Equals("个"))
- {
- row.Cells["SendNum"].Value = frm.acount;
- }
- else
- {
- row.Cells["SendNum"].Value = frm.wgt;
- }
- }
- else
- {
- return;
- }
- }
- private void cmbAcount_EditorButtonClick_1(object sender, EditorButtonEventArgs e)
- {
- }
-
- }
- }
|