public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TransportOrderNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderYear?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DocumentTransportNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureCustomerName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureState?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationState?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Qty?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderWeight?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Volume?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Pallet?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RetiredDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DeliveryDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Note?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CallCustomerBefore?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Telephone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DayClosed?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Urgent?.GetHashCode() ?? 0); return(hashCode); }
/// <summary> /// 新增一行记录信息 /// </summary> private void AddRow(OrderWeight m) { gvInfo.Rows.Add(1); int rowindex = gvInfo.Rows.Count - 2; gvInfo.Rows[rowindex].Cells[1].Value = (rowindex + 1).ToString(); gvInfo.Rows[rowindex].Cells[2].Value = m.OrderId; gvInfo.Rows[rowindex].Cells[3].Value = m.ScanTime; gvInfo.Rows[rowindex].Cells[4].Value = m.EmName; gvInfo.Rows[rowindex].Cells[5].Value = m.Weight.ToString(); gvInfo.Rows[rowindex].Cells[6].Value = m.Count.ToString(); }
private void button1_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtSerno.Text)) { NoticeInfo("快递单号不能为空!"); txtSerno.Focus(); return; } if (string.IsNullOrEmpty(txtWeight.Text)) { NoticeInfo("货物重量不能为空!"); txtSerno.Focus(); return; } if (txtSerno.Text.Length != Convert.ToInt32(ddlSerLength.Text)) { NoticeInfo("单号长度有误,请重新扫描!"); txtSerno.Focus(); txtSerno.SelectAll(); return; } if (db.ExecuteQuery <OrderWeight>("select * from OrderWeight where OrderId='" + txtSerno.Text.Trim() + "'").Count() > 0) { NoticeInfo("该单号在数据库中已经存在,不用再重新扫描!"); txtSerno.Focus(); txtSerno.SelectAll(); return; } OrderWeight orderWeight = new OrderWeight(); orderWeight.CreateOn = DateTime.Now.ToString(); orderWeight.CreateBy = 1; orderWeight.OrderId = txtSerno.Text.Trim(); orderWeight.Weight = double.Parse(txtWeight.Text.ToLower().Replace("kg", "")); orderWeight.ScanTime = DateTime.Now.ToString(); orderWeight.Count = int.Parse(cbCount.Text); orderWeight.EmName = txtCollector.Text; orderWeight.EmNo = txtCollector.Tag.ToString(); db.OrderWeights.InsertOnSubmit(orderWeight); AddRow(orderWeight); db.SubmitChanges(); Clear(); p.Play(); } catch (Exception) { } }
public IEnumerator <KeyValuePair <string, string> > GetEnumerator() { yield return(new KeyValuePair <string, string>("OrderNumber", OrderNumber)); yield return(new KeyValuePair <string, string>("ShippingDate", ShippingDate.ToLongDateString())); yield return(new KeyValuePair <string, string>("StockNumber", StockNumber)); yield return(new KeyValuePair <string, string>("BayLocation", BayLocation)); yield return(new KeyValuePair <string, string>("CustomerNum", CustomerNum)); yield return(new KeyValuePair <string, string>("CustomerName", CustomerName)); yield return(new KeyValuePair <string, string>("isKit", IsKit.ToString())); yield return(new KeyValuePair <string, string>("ItemDesc1", ItemDesc1)); yield return(new KeyValuePair <string, string>("ItemDesc2", ItemDesc2)); yield return(new KeyValuePair <string, string>("ComponentItemNumber", ComponentItemNumber)); yield return(new KeyValuePair <string, string>("OrderWeight", OrderWeight.ToString())); }