예제 #1
0
 void m_keyboardSpread_RowAdded(object sender, int rowIndex)
 {
     // Unlock cells
     CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.ITEM_CD);
     CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.ITEM_CD_BTN);
     CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.ORDER_QTY);
     CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.LOT_NO);
     // CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.SUPP_LOT_NO);
     // CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.PRICE);
     if (rdoReceive.Checked)
     {
         shtView.Columns[(int)eColView.PRICE].Locked       = false;
         shtView.Columns[(int)eColView.SUPP_LOT_NO].Locked = false;
     }
     if (rdoReceiveReturn.Checked)
     {
         shtView.Columns[(int)eColView.PRICE].Locked       = true;
         shtView.Columns[(int)eColView.SUPP_LOT_NO].Locked = true;
         int row = shtView.Rows.Count;
         for (int i = 0; i < row; i++)
         {
             shtView.Cells[i, (int)eColView.PRICE].Text       = string.Empty;
             shtView.Cells[i, (int)eColView.SUPP_LOT_NO].Text = string.Empty;
         }
     }
 }
예제 #2
0
 void m_keyboardSpread_RowAdded(object sender, int rowIndex)
 {
     // Unlock cells
     CtrlUtil.SpreadSetCellLocked(shtIssueList, false, rowIndex, (int)eColView.ITEM_CODE);
     CtrlUtil.SpreadSetCellLocked(shtIssueList, false, rowIndex, (int)eColView.ITEM_CD_BTN);
     CtrlUtil.SpreadSetCellLocked(shtIssueList, false, rowIndex, (int)eColView.ISSUE_QTY);
     CtrlUtil.SpreadSetCellLocked(shtIssueList, false, rowIndex, (int)eColView.LOT_NO);
     CtrlUtil.SpreadSetCellLocked(shtIssueList, false, rowIndex, (int)eColView.LOT_BTN);
 }
예제 #3
0
        void m_keyboardSpread_RowAdded(object sender, int rowIndex)
        {
            CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.LOT_NO);
            CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.EXTERNAL_LOT_NO);
            CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.QTY);

            //CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.ITEM_CD);
            //CtrlUtil.SpreadSetCellLocked(shtView, false, rowIndex, (int)eColView.ITEM_CD_BTN);

            // fix for Add New Row
            //((DataTable)shtView.DataSource).Rows[rowIndex][(int)eColView.CHILD_ORDER_LOC_CD]

            //shtView.Cells[rowIndex, (int)eColView.CHILD_ORDER_LOC_CD].Value = cboOrderLoc.SelectedValue;


            // ((DataTable)shtView.DataSource).Rows[rowIndex][WorkResultEntryViewDTO.eColumns.ITEM_CD.ToString()]

            //((DataTable)shtView.DataSource).Rows[rowIndex][WorkResultEntryViewDTO.eColumns.LOC_CD.ToString()] = GetConsumptionLocation(Convert.ToString(shtView.Cells[rowIndex, (int)eColView.ITEM_CD].Value));

            //// fix for Add New Row
            //((DataTable)shtView.DataSource).Rows[rowIndex][(int)eColView.CHILD_ORDER_LOC_CD] = cboOrderLoc.SelectedValue;//.Cells[rowIndex, 2].Value = cboOrderLoc.SelectedValue;
        }
예제 #4
0
        private void AutoCheckFromMainScreen()
        {
            if (shtPreviousLot == null || shtPreviousLot.RowCount <= 0 || shtView.RowCount <= 0)
            {
                return;
            }

            for (int i = 0; i < shtPreviousLot.RowCount; i++)
            {
                string pOrderDetailNo = Convert.ToString(shtPreviousLot.GetValue(i, (int)eColPreviousLot.REF_SLIP_NO));
                string pItemCd        = Convert.ToString(shtPreviousLot.GetValue(i, (int)eColPreviousLot.ITEM_CD));
                string pPackNo        = Convert.ToString(shtPreviousLot.GetValue(i, (int)eColPreviousLot.PACK_NO));
                string pLotNo         = Convert.ToString(shtPreviousLot.GetValue(i, (int)eColPreviousLot.LOT_NO));

                if (pItemCd != ItemCd)
                {
                    continue;
                }

                for (int j = 0; j < shtView.RowCount; j++)
                {
                    if (Convert.ToString(shtView.GetValue(j, (int)eColumns.PACK_NO)) == pPackNo &&
                        Convert.ToString(shtView.GetValue(j, (int)eColumns.LOT_NO)) == pLotNo)
                    {
                        if (OrderDetailNo.StrongValue != pOrderDetailNo)
                        {
                            shtView.Rows[j].BackColor = Color.DarkSlateGray;
                            CtrlUtil.SpreadSetCellLocked(shtView, true, j, (int)eColumns.CHECK_FLAG);
                        }
                        else
                        {
                            shtView.Cells[j, (int)eColumns.CHECK_FLAG].Value = true;
                        }
                        break;
                    }
                }
            }
        }
예제 #5
0
        private void fpQueryList_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.Column == (int)eCol.Checkbox)
            {
                bool blCheck = Convert.ToBoolean(shtQueryList.Cells[e.Row, (int)eCol.Checkbox].Value);

                if (blCheck)
                {
                    string oType = shtQueryList.Cells[e.Row, (int)eCol.ColumnType].Text;

                    if (eColumnType.String.ToString().Equals(oType))
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value1);
                        // Add by Pongthorn S. @ 2012-05-18
                        if (shtQueryList.Cells[e.Row, (int)eCol.ColumnName].Text != DataDefine.MASTER_NO_FIELD_NAME)
                        {
                            CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value2);
                        }
                        else
                        {
                            CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value2);
                        }
                    }
                    else
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value1);
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value2);
                    }
                }
                else
                {
                    object oType = shtQueryList.Cells[e.Row, (int)eCol.ColumnType].Value;

                    if (eColumnType.String.ToString().Equals(oType))
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value1);
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value2);
                    }
                    else
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value1);
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value2);
                    }
                }
            }

            //if (e.Column == (int)eCol.Checkbox)
            //{
            //    bool blCheck = Convert.ToBoolean(shtQueryList.Cells[e.Row, (int)eCol.Checkbox].Value);

            //    if (blCheck)
            //    {
            //        int iMaxPriority = 0;
            //        int iPriority = 0;
            //        for (int i = 0; i < shtQueryList.RowCount; i++)
            //        {
            //            iPriority = 0;
            //            iPriority = Convert.ToInt32(shtQueryList.Cells[i, (int)eCol.Priority].Value);

            //            if (iPriority > iMaxPriority)
            //            {
            //                iMaxPriority = iPriority;
            //            }
            //        }

            //        iMaxPriority = (int)(iMaxPriority / 10 * 10) + 10;

            //        shtQueryList.Cells[e.Row, (int)eCol.Priority].Value = iMaxPriority;
            //    }
            //    else
            //    {
            //        shtQueryList.Cells[e.Row, (int)eCol.Priority].Value = null;
            //    }
            //}
        }