Пример #1
0
 private void SetInfo(Foresight.DataAccess.CKProductInSumary data)
 {
     this.tdAddUserName.Value         = data.AddUserName;
     this.tdInTime.Value              = data.InTime > DateTime.MinValue ? data.InTime.ToString("yyyy-MM-dd HH:mm:ss") : "";
     this.tdOrderNumber.Value         = data.OrderNumber;
     this.tdContract.Value            = data.ContractID > 0 ? data.ContractID.ToString() : "";
     this.tdContractUserName.Value    = data.ContractUserName;
     this.tdContractPhoneNumber.Value = data.ContractPhoneNumber;
     this.tdInCategory.Value          = data.InCategoryID > 0 ? data.InCategoryID.ToString() : "";
     this.tdBelongTeamName.Value      = data.BelongTeamName;
     SetCKName(data.CKCategoryID);
 }
Пример #2
0
        public static string GetLastestPrintNumber(string OrderTypeName, SqlHelper helper, out int OrderNumberID)
        {
            if (string.IsNullOrEmpty(OrderTypeName))
            {
                OrderTypeName = Foresight.DataAccess.OrderTypeNameDefine.productinnumber.ToString();
            }
            Sys_OrderNumber sysOrderNumber = Sys_OrderNumber.GetSys_OrderNumberByRoomID(OrderTypeName, 0, helper);

            if (sysOrderNumber == null)
            {
                OrderNumberID = 0;
                return(string.Empty);
            }
            OrderNumberID = sysOrderNumber.ID;
            CKProductInSumary history = CKProductInSumary.GetLastCKProductInSumary(OrderNumberID, helper);
            string            Part1   = string.Empty;

            Part1 += sysOrderNumber.OrderPrefix;
            if (sysOrderNumber.UseYear)
            {
                Part1 += DateTime.Now.ToString("yyyy");
            }
            if (sysOrderNumber.UseMonth)
            {
                Part1 += DateTime.Now.ToString("MM");
            }
            if (sysOrderNumber.UseDay)
            {
                Part1 += DateTime.Now.ToString("dd");
            }
            int OrderNumberCount = sysOrderNumber.OrderNumberCount <= 0 ? 3 : sysOrderNumber.OrderNumberCount;
            int number           = 1;

            if (history != null && !string.IsNullOrEmpty(history.OrderNumber))
            {
                number = PrintRoomFeeHistory.GetOrderNumberBySysOrder(history.OrderNumber, sysOrderNumber, out OrderNumberCount);
            }
            return(Part1 + number.ToString("D" + OrderNumberCount));
        }