Пример #1
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:手术时间 手术项目
            if (Item == null) // 如果没有项目,则默认为显示内容为空
            {
                return;
            }

            Texts.Insert(0, new OutputInfoStruct("行 " + Item.Name.Trim(), OrderOutputTextType.ItemName));

            if (AnesthesiaOperation.KeyInitialized)
            {
                if (String.IsNullOrEmpty(AnesthesiaOperation.Name.Trim()))
                {
                    AnesthesiaOperation.ReInitializeProperties();
                }
                Texts.Insert(0, new OutputInfoStruct("在 " + AnesthesiaOperation.Name.Trim() + " 下 ", OrderOutputTextType.NormalText));
            }
            if (OperationTime > DateTime.MinValue)
            {
                Texts.Insert(0, new OutputInfoStruct(OperationTime.ToString("M月d日 HH:mm", CultureInfo.CurrentCulture) + " "
                                                     , OrderOutputTextType.EntrustContent));
            }
        }
Пример #2
0
        /// <summary>
        /// 将手术时间和麻醉代码组合到嘱托中
        /// </summary>
        private string ComposeEntrustContent()
        {
            if (OperationTime == DateTime.MinValue)
            {
                return("");
            }

            string anesthesia;
            string entrust;

            if ((_anesthesiaOperation != null) && _anesthesiaOperation.KeyInitialized)
            {
                anesthesia = AnesthesiaOperation.Code;
            }
            else
            {
                anesthesia = "";
            }
            if (String.IsNullOrEmpty(EntrustContent))
            {
                entrust = "";
            }
            else
            {
                entrust = EntrustContent;
            }

            return(String.Format(CultureInfo.CurrentCulture, "{1}{0}{2}{0}{3}"
                                 , OrderContent.CombFlag
                                 , OperationTime.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.CurrentCulture)
                                 , anesthesia
                                 , entrust));
        }
Пример #3
0
 /// <summary>
 /// Сравниваем время по времени обработки
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public int CompareTo(object obj)
 {
     if (obj is Time t)
     {
         return(OperationTime.CompareTo(t.OperationTime));
     }
     throw new Exception("Невозможно сравнить это оборудование");
 }
Пример #4
0
 public void FromCustomObject(SqlConnection con, IntPtr pUdt)
 {
     SqlUdt.SetValue(con, pUdt, "ID", ID.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "CheckID", CheckID.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "WarehouseNo", WarehouseNo.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "HouseNo", HouseNo.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "AreaNo", AreaNo.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "MaterialNo", MaterialNo.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "MaterialDesc", MaterialDesc.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "AccountQty", AccountQty.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "ScanQty", ScanQty.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "Status", Status.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "StockTime", StockTime.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "Operator", Operator.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "OperationTime", OperationTime.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "ProfitLoss", ProfitLoss.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "DifferenceQty", DifferenceQty.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "IsDel", IsDel.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "Creater", Creater.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "CreateTime", CreateTime.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "Modifyer", Modifyer.ToSqlValue());
     SqlUdt.SetValue(con, pUdt, "ModifyTime", ModifyTime.ToSqlValue());
 }