/// <summary> /// Deprecated Method for adding a new object to the tinpshippingdtlctn EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotinpshippingdtlctn(tinpshippingdtlctn tinpshippingdtlctn) { base.AddObject("tinpshippingdtlctn", tinpshippingdtlctn); }
/// <summary> /// Create a new tinpshippingdtlctn object. /// </summary> /// <param name="shippingsysid">Initial value of the shippingsysid property.</param> /// <param name="customerid">Initial value of the customerid property.</param> /// <param name="custorderno">Initial value of the custorderno property.</param> /// <param name="cartonno">Initial value of the cartonno property.</param> public static tinpshippingdtlctn Createtinpshippingdtlctn(global::System.String shippingsysid, global::System.String customerid, global::System.String custorderno, global::System.String cartonno) { tinpshippingdtlctn tinpshippingdtlctn = new tinpshippingdtlctn(); tinpshippingdtlctn.shippingsysid = shippingsysid; tinpshippingdtlctn.customerid = customerid; tinpshippingdtlctn.custorderno = custorderno; tinpshippingdtlctn.cartonno = cartonno; return tinpshippingdtlctn; }
private void DoShipping(bool isDoShipping) { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); try { baseForm.SetCursor(); baseForm.ValidateData(this); List<tinpshippingdtlctn> lstshippingdtlctn = new List<tinpshippingdtlctn>(); foreach (string key in ht.Keys) { DataTable dt = ht[key] as DataTable; int ctnqty = 0; foreach (DataRow row in dt.Rows) { if (row["ck"].ToString().Equals("Y")) { tinpshippingdtlctn shippingdtlctn = new tinpshippingdtlctn(); shippingdtlctn.shippingsysid = ShipingSysId; shippingdtlctn.customerid = row["customerid"].ToString(); shippingdtlctn.custorderno = key; shippingdtlctn.cartonno = row["cartonno"].ToString(); shippingdtlctn.pairqty = Convert.ToInt16(row["pairqty"].ToString()); lstshippingdtlctn.Add(shippingdtlctn); ctnqty++; } } if (ctnqty > getPlanQty(key) || (isDoShipping && ctnqty != getPlanQty(key))) { throw new Exception(UtilCulture.GetString("Msg.R01024")); } } tinpshipping shipping = new tinpshipping(); shipping.shippingsysid = ShipingSysId; shipping.packingboxno = this.txtPackingBoxNo.Text; shipping.shippingno = this.txtShipNo.Text; shipping.containerno = this.txtContainerNo.Text; shipping.blno = this.txtBlNo.Text; //shipping.contractno = this.txtContractNo.Text; if (this.cmbLoadingType.SelectedItem != null) { shipping.loadingtype = ((ValueInfo)this.cmbLoadingType.SelectedItem).ValueField; } tinpshippingplan shippingplan = new tinpshippingplan(); shippingplan.shippingplanno = ((ValueInfo)this.cmbShippingPlanNo.SelectedItem).DisplayField; shippingplan.loadingdate = Convert.ToDateTime(this.dtLoadingDt.Value); shippingplan.boxqty = this.txtBoxQty.Text; shippingplan.deliverybill = this.txtBlNo.Text; shippingplan.inshipno = this.txtInShipNo.Text; shippingplan.commissionedqty = Convert.ToInt16(this.numCommissionedQty.Value); shippingplan.commissionedvolume = this.numCommissionedVolume.Value; shippingplan.commissionedweight = this.numCommissionedWeight.Value; shippingplan.startport = this.txtStartPort.Text; shippingplan.destinationport = this.txtDestinationPort.Text; shippingplan.unloadport = this.txtUnloadPort.Text; shippingplan.voyage = this.txtVoyage.Text; client.DoShipping(baseForm.CurrentContextInfo, shipping, lstshippingdtlctn.ToArray<tinpshippingdtlctn>(),shippingplan, isDoShipping); baseForm.CreateMessageBox(Public_MessageBox.Information, MessageBoxButtons.OK, null, UtilCulture.GetString("Msg.R00028")); this.Close(); } catch (Exception ex) { baseForm.CreateMessageBox(Public_MessageBox.Error, MessageBoxButtons.OK, null, ex.Message); } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } }