private void ShowButtons(CheckStoreOrderState state)
        {
            bool value = ((state == CheckStoreOrderState.PendingReview));

            this.BaseButtonConfirm.Visible = value;
            this.curCheckStoreOrder.State  = (int)state;
            switch (state)
            {
            case CheckStoreOrderState.All:
                break;

            case CheckStoreOrderState.PendingReview:
                break;

            case CheckStoreOrderState.Approved:
                //   this.skinLabel_StateName.Text = "已审核";
                this.skinLabel_approvedTime.Text = this.curCheckStoreOrder.CheckTime.ToString(DateTimeUtil.DEFAULT_DATETIME_FORMAT);
                break;

            case CheckStoreOrderState.Canceled:
                // this.skinLabel_StateName.Text = "已退回";

                break;

            case CheckStoreOrderState.Expired:
                break;

            case CheckStoreOrderState.Suspend:
                break;

            default:
                break;
            }
        }
        private void BindingCheckStoreDetailSource(List <CheckStoreDetail> list, CheckStoreOrderState curState)
        {
            if (list != null && list.Count > 0)
            {
                foreach (CheckStoreDetail detail in list)
                {
                    detail.CostumeName = CommonGlobalCache.GetCostumeName(detail.CostumeID);
                    //if (curState == CheckStoreOrderState.ChildOrder) {
                    //    detail.SumCountWinLost = 0;
                    //}
                }
            }

            this.dataGridViewPagingSumCtrl.BindingDataSource <CheckStoreDetail>(DataGridViewUtil.ToDataTable(list));
        }
Beispiel #3
0
 public void WorkDeskCtrlSearch(CheckStoreOrderState state)
 {
     this.pagePara = new CheckStoreOrderPagePara()
     {
         CheckStoreOrderID = null,
         IsOpenDate        = false,
         StartDate         = null,
         EndDate           = null,
         PageIndex         = 0,
         PageSize          = this.dataGridViewPagingSumCtrl.PageSize,
         ShopID            = shopID,
         CostumeID         = CostumeCurrentShopTextBox1.Text,
         State             = state
     };
     Search();
 }
Beispiel #4
0
        public static string GetStateName(CheckStoreOrderState state)
        {
            string stateName = "";

            switch (state)
            {
            case CheckStoreOrderState.PendingReview:
                stateName = "待审核";
                break;

            case CheckStoreOrderState.Approved:
                stateName = "已审核";
                break;

            case CheckStoreOrderState.Canceled:
                stateName = "已退回";
                break;

            case CheckStoreOrderState.Expired:
                stateName = "已失效";
                break;

            case CheckStoreOrderState.Suspend:
                stateName = "已挂单";
                break;

            case CheckStoreOrderState.Checking:
                stateName = "盘点中";
                break;

            case CheckStoreOrderState.TaskIsCancel:
                stateName = "已取消";
                break;

            case CheckStoreOrderState.OverrideOrder:
                stateName = "已冲单";
                break;

            case CheckStoreOrderState.ChildOrder:
                stateName = "子盘点";
                break;
            }
            return(stateName);
        }
Beispiel #5
0
        private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            DataGridViewUtil.CellFormatting_ReportShowZero(e, this.ReportShowZero);

            DataGridViewRow row   = dataGridView1.Rows[e.RowIndex];
            CheckStoreOrder order = (CheckStoreOrder)row.DataBoundItem;

            if (ColumnDelete.Index == e.ColumnIndex || ColumnEdit.Index == e.ColumnIndex)
            {
                //已取消,不能修改
                CheckStoreOrderState orderState = (CheckStoreOrderState)order.State;
                if (orderState == CheckStoreOrderState.TaskIsCancel || orderState == CheckStoreOrderState.OverrideOrder)
                {
                    e.Value = null;
                }
                //else if (
                //    order.ShopID != CommonGlobalCache.CurrentShopID
                //    )
                ////  && !CommonGlobalUtil.IsAdminUser(order.OperatorUserID))
                //{    //店铺是自己的可以删可以改,
                //     //失效、退回、挂单可以删除
                //     //是管理端发起的盘点,POS端不能修改删除
                //    e.Value = null;
                //}
                else if ((CheckStoreOrderState)order.State == CheckStoreOrderState.Approved)
                {
                    //审核待审核不能删除,并且店铺不是自己的
                    //shopID=null 这是总仓
                    e.Value = null;
                }
            }
            else if (createTimeDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                if ((CheckStoreOrderState)order.State == CheckStoreOrderState.Suspend)
                {
                    e.Value = null;
                }
            }
            else if (e.ColumnIndex == ColumnCancel.Index)
            {
                if (
                    //IsPos ||
                    (CheckStoreOrderState)order.State != CheckStoreOrderState.Approved ||
                    (CheckStoreOrderState)order.State == CheckStoreOrderState.ChildOrder /*|| order.ShopID != CommonGlobalCache.CurrentShopID*/)
                {
                    e.Value = null;
                }
            }
            else if (e.ColumnIndex == ColumnRedo.Index)
            {
                if ((CheckStoreOrderState)order.State != CheckStoreOrderState.OverrideOrder
                    //  || order.ShopID != CommonGlobalCache.CurrentShopID
                    || (CheckStoreOrderState)order.State == CheckStoreOrderState.ChildOrder)
                {
                    e.Value = null;
                }
            }
            else if (e.ColumnIndex == ColumnPrint.Index)
            {
                if ((CheckStoreOrderState)order.State == CheckStoreOrderState.ChildOrder)
                {
                    e.Value = null;
                }
            }
        }