Beispiel #1
0
 internal void UpdateData(DataRow row)
 {
     row.ItemArray = new object[] {
         (IsNewItem) ? null : (object)Id,
         Code ?? string.Empty,
         Text ?? string.Empty,
         Count,
         FinalCount,
         ReceiveDate.ToString(),
         EstimatedDate.ToString(),
         TerminationDate.ToString(),
         Status
     };
 }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (OrderNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (WrittenDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (NotBeforeDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (QuantityOrdered?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ReceiveDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (QuantityReceived?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Caller?.GetHashCode() ?? 0);
            return(hashCode);
        }
Beispiel #3
0
 //使接收框的滚动条一直保持在最下方
 private void ReceiveDate_TextChanged(object sender, EventArgs e)
 {
     this.ReceiveDate.SelectionStart  = 0;                            //设置文本的开始位置
     this.ReceiveDate.SelectionLength = this.ReceiveDate.Text.Length; //设置为要选择的文本的长度
     ReceiveDate.ScrollToCaret();
 }
Beispiel #4
0
 public override string ToString()
 {
     return(string.Format("{0}>[{1}]|{2}/{3}", ReceiveDate.ToDateTimeString(), Asset, BestBid, BestAsk));
 }
Beispiel #5
0
        public string UndateSQL()
        {
            String sql = "update workorder set productorder = '{0}',type = '{1}',scheduledate='{2}',lenth={3},width = {4}," +
                         "thickness={5},gross={6},done={7},undone={8},completedate='{9}',machinecode='{10}',worker='{11}'," +
                         "worth={12},remark='{13}',status={14} ,receivedate = '{15}',grosswidth = {16} where id = {17} ";

            return(String.Format(sql, ProductOrder, Type, ScheduleDate.ToString("yyyy-MM-dd"), Length.ToString(), Width.ToString(),
                                 Thickness.ToString(), Gross.ToString(), Done.ToString(), Undo.ToString(), CompleteDate.ToString("yyyy-MM-dd"),
                                 MachineCode, Worker, Worth.ToString(), Remark, Status.ToString(), ReceiveDate.ToString("yyyy-MM-dd HH:mm:ss"),
                                 GrossWidth.ToString(), id.ToString()));
        }
Beispiel #6
0
        public string InsertSQL()
        {
            String sql = "insert into workorder (productorder,type,scheduledate,lenth,width," +
                         "thickness,gross,done,undone,completedate,machinecode,worker,worth,remark,status,receivedate,grosswidth) " +
                         "values ('{0}','{1}','{2}',{3},{4},{5},{6},{7},{8},'{9}','{10}','{11}',{12},'{13}',{14},'{15}',{16})";

            return(String.Format(sql, ProductOrder, Type, ScheduleDate.ToString("yyyy-MM-dd"), Length.ToString(), Width.ToString(),
                                 Thickness.ToString(), Gross.ToString(), Done.ToString(), Undo.ToString(), CompleteDate.ToString("yyyy-MM-dd"),
                                 MachineCode, Worker, Worth.ToString(), Remark, Status.ToString(), ReceiveDate.ToString("yyyy-MM-dd HH:mm:ss"), GrossWidth.ToString()));
        }
 //centralize format
 //adding new field guide
 //add new column in Query viewer
 //add new added element to ToArray respected to its column index in QueryViewer
 //update editor acordingly
 public string[] ToArray(bool skipErorrMessage = true)
 {
     return(new string[] { Id.ToString(), ADName, ResignDay.ToString("dd/MM/yyyy hh:mm:ss tt"), HRCode,
                           ReceiveDate.ToString("dd/MM/yyyy hh:mm:ss tt"), Status.ToString(), Manager, skipErorrMessage? null : ErrorMessage });
 }