Esempio n. 1
0
 public void OnSoftVersionSelectedEvent(object sender, ParentChildRelateEventArgs <string> e)
 {
     if (this.ResCodeSelectedEvent != null)
     {
         ResCodeSelectedEvent(sender, e);
     }
 }
Esempio n. 2
0
        void objForm_StackInfoEvent(object sender, ParentChildRelateEventArgs <System.Collections.Hashtable> e)
        {
            this.SelectedStack   = e.CustomObject["stackcode"].ToString();
            this.SelectedStorage = e.CustomObject["storagecode"].ToString();

            //Check从垛位使用状况的页面带过来的垛位和库位
            if (this.CheckSelecetedStackAndStorage(this.SelectedStorage, this.SelectedStack, Convert.ToString(this.ucLabelComboxINVType.SelectedItemValue)))
            {
                this.ucLabelEditStock.Value = e.CustomObject["stackcode"].ToString();
            }

            InventoryFacade inventoryFacade = new InventoryFacade(DataProvider);

            //更新剁位状态
            if (this.ucLabelEditStock.Value.Trim().Length > 0)
            {
                object objectStackMessage = inventoryFacade.GetStackMessage(this.ucLabelEditStock.Value.Trim().ToUpper());
                if (objectStackMessage != null)
                {
                    this.ucLabelEditstackMessage.Value = ((StackMessage)objectStackMessage).StackQtyMessage;
                }
                else
                {
                    SStack objectStack = (SStack)inventoryFacade.GetSStack(this.ucLabelEditStock.Value.Trim().ToUpper());
                    if (objectStack != null)
                    {
                        this.ucLabelEditstackMessage.Value = "0" + "/" + objectStack.Capacity;
                    }
                    else
                    {
                        this.ucLabelEditstackMessage.Value = string.Empty;
                    }
                }
            }
        }
Esempio n. 3
0
 public void OnEvent(object sender, ParentChildRelateEventArgs <string> e)
 {
     if (Event != null)
     {
         Event(sender, e);
     }
 }
Esempio n. 4
0
        private void ucButtonOK_Click(object sender, EventArgs e)
        {
            if (this.ultraGridTry.Rows.Count == 0)
            {
                return;
            }

            string tryCode = string.Empty;

            for (int i = 0; i < ultraGridTry.Rows.Count; i++)
            {
                if (ultraGridTry.Rows[i].Cells[0].Text.ToLower() == "true")
                {
                    if (Convert.ToInt32(ultraGridTry.Rows[i].Cells["PlanQty"].Text.Trim()) <= Convert.ToInt32(ultraGridTry.Rows[i].Cells["ActualQty"].Text.Trim()))
                    {
                        ApplicationRun.GetInfoForm().Add(new UserControl.Message(MessageType.Error, "$Current_TryCode:" + ultraGridTry.Rows[i].Cells["TryCode"].Text +
                                                                                 "   $CS_PlanQty:" + ultraGridTry.Rows[i].Cells["PlanQty"].Text +
                                                                                 "   $CS_ActualQty:" + ultraGridTry.Rows[i].Cells["ActualQty"].Text));
                        return;
                    }

                    tryCode += "," + ultraGridTry.Rows[i].Cells["TryCode"].Text.Trim().ToUpper();
                }
            }

            if (tryCode.Length > 0)
            {
                tryCode = tryCode.Substring(1);
            }
            ParentChildRelateEventArgs <string> args = new ParentChildRelateEventArgs <string>(tryCode);

            this.OnSoftVersionSelectedEvent(sender, args);
            this.Close();
        }
Esempio n. 5
0
        private void ucButtonOK_Click(object sender, EventArgs e)
        {
            if (this.ultraGridResCode.Rows.Count == 0)
            {
                return;
            }

            string resCode = string.Empty;

            for (int i = 0; i < ultraGridResCode.Rows.Count; i++)
            {
                if (ultraGridResCode.Rows[i].Cells[0].Text.ToLower() == "true")
                {
                    resCode += "," + ultraGridResCode.Rows[i].Cells[1].Text.Trim().ToUpper();
                }
            }

            if (resCode.Length > 0)
            {
                resCode = resCode.Substring(1);
            }
            ParentChildRelateEventArgs <string> args = new ParentChildRelateEventArgs <string>(resCode);

            this.OnSoftVersionSelectedEvent(sender, args);
            this.Close();
        }
Esempio n. 6
0
 public void OnStackInfoEvent(object sender, ParentChildRelateEventArgs <Hashtable> e)
 {
     if (this.StackInfoEvent != null)
     {
         StackInfoEvent(sender, e);
     }
 }
Esempio n. 7
0
 public void OnProductInfoEvent(object sender, ParentChildRelateEventArgs <Hashtable> e)
 {
     if (this.ProductInfoEvent != null)
     {
         ProductInfoEvent(sender, e);
     }
 }
Esempio n. 8
0
        private void cmdOK_Click(object sender, EventArgs e)
        {
            if (this.gridProduct.Rows.Count == 0)
            {
                //表格中没有数据
                ApplicationRun.GetInfoForm().Add(
                    new UserControl.Message(MessageType.Error, "$CS_GRID_NO_RECORD"));
                return;
            }

            if (this.gridProduct.ActiveRow != null)
            {
                Hashtable ht = new Hashtable();
                ht.Add("itemcode", this.gridProduct.ActiveRow.Cells["itemcode"].Value.ToString());
                ht.Add("itemdesc", this.gridProduct.ActiveRow.Cells["itemdesc"].Value.ToString());
                ParentChildRelateEventArgs <Hashtable> args = new ParentChildRelateEventArgs <Hashtable>(ht);
                this.OnProductInfoEvent(sender, args);
                this.Close();
            }
            else
            {
                //请选择一笔数据
                ApplicationRun.GetInfoForm().Add(
                    new UserControl.Message(MessageType.Error, "$CS_GRID_SELECT_ONE_RECORD"));
            }
        }
Esempio n. 9
0
 public void OnEvent(object sender, ParentChildRelateEventArgs <TSEditInformation> e)
 {
     if (Event != null)
     {
         Event(sender, e);
     }
 }
Esempio n. 10
0
        private void ucButtonOK_Click(object sender, EventArgs e)
        {
            if (this.ultraGridStorageCode.Rows.Count == 0)
            {
                return;
            }

            string storageCode = string.Empty;

            for (int i = 0; i < ultraGridStorageCode.Rows.Count; i++)
            {
                if (ultraGridStorageCode.Rows[i].Cells[0].Text.ToLower() == "true")
                {
                    storageCode += "," + ultraGridStorageCode.Rows[i].Cells[1].Text.Trim().ToUpper();
                }
            }

            if (storageCode.Length > 0)
            {
                storageCode = storageCode.Substring(1);
            }
            //else
            //{
            //    //返回空字符串,为了和点击取消区分
            //    storageCode = "$&Empty";
            //}
            ParentChildRelateEventArgs <string> args = new ParentChildRelateEventArgs <string>(storageCode);

            this.OnSoftVersionSelectedEvent(sender, args);
            this.Close();
        }
Esempio n. 11
0
        private void txtStackCode_TxtboxKeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                int inputLength = this.txtStackCode.Value.Trim().Length;

                if (inputLength == 0)
                {
                    this.txtStackCode.TextFocus(true, true);
                    return;
                }

                if (this.gridStack.ActiveRow != null)
                {
                    //所有checkbox为false
                    for (int i = 0; i < gridStack.Rows.Count; i++)
                    {
                        gridStack.Rows[i].Cells["Checked"].Value = false;
                    }
                    //左匹配所有符合的行
                    for (int i = 0; i < gridStack.Rows.Count; i++)
                    {
                        if (gridStack.Rows[i].Cells["stackcode"].Value.ToString().Length >= inputLength &&
                            gridStack.Rows[i].Cells["stackcode"].Value.ToString().ToUpper().Substring(0, inputLength) == this.txtStackCode.Value.Trim().ToUpper())
                        {
                            if (gridStack.Rows[i].Cells["Checked"].Value.ToString().ToLower() == "false")
                            {
                                gridStack.Rows[i].Cells["Checked"].Value = true;
                                break;
                            }
                        }
                    }

                    string strStackCode = string.Empty;
                    //回车时只带回第一笔
                    for (int i = 0; i < this.gridStack.Rows.Count; i++)
                    {
                        if (this.gridStack.Rows[i].Cells["Checked"].Value.ToString().ToLower() == "true")
                        {
                            strStackCode = this.gridStack.Rows[i].Cells["stackcode"].Value.ToString();
                            break;
                        }
                    }

                    if (strStackCode.Trim() != string.Empty && strStackCode.Trim().Length > 0)
                    {
                        Hashtable ht = new Hashtable();
                        ht.Add("storagecode", this.gridStorage.ActiveRow.Cells["StoreroomCode"].Value.ToString());
                        ht.Add("stackcode", strStackCode);
                        ParentChildRelateEventArgs <Hashtable> args = new ParentChildRelateEventArgs <Hashtable>(ht);
                        this.OnStackInfoEvent(sender, args);
                        this.Close();
                    }
                }
            }
        }
Esempio n. 12
0
        void objForm_StackInfoEvent(object sender, ParentChildRelateEventArgs <System.Collections.Hashtable> e)
        {
            this.SelectedStack   = e.CustomObject["stackcode"].ToString();
            this.SelectedStorage = e.CustomObject["storagecode"].ToString();

            //Check从垛位使用状况的页面带过来的垛位和库位
            if (this.CheckSelecetedStackAndStorage(this.SelectedStorage, this.SelectedStack, Convert.ToString(this.ucLabelComboxINVType.SelectedItemValue)))
            {
                this.ucLabelEditStock.Value = e.CustomObject["stackcode"].ToString();
            }

            //this.ucLabelEditStock.Value = e.CustomObject["stackcode"].ToString();
        }
Esempio n. 13
0
        private void ucButtonOK_Click(object sender, EventArgs e)
        {
            if (this.ultraGridSoftVersion.Rows.Count == 0)
            {
                return;
            }

            if (this.ultraGridSoftVersion.ActiveRow != null)
            {
                string versionName = this.ultraGridSoftVersion.ActiveRow.Cells["VersionName"].Value.ToString();
                ParentChildRelateEventArgs <string> args = new ParentChildRelateEventArgs <string>(versionName);
                this.OnSoftVersionSelectedEvent(sender, args);

                this.Close();
            }
        }
Esempio n. 14
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            this.gridStack.UpdateData();
            //this.gridStorage.UpdateData();

            if (this.gridStorage.ActiveRow != null)
            {
                //this.m_StorageCode = this.gridStorage.ActiveRow.Cells["StoreroomCode"].Text.Trim();
                Int32  intCheckNum  = 0;
                string strStackCode = string.Empty;
                for (int i = 0; i < this.gridStack.Rows.Count; i++)
                {
                    if (this.gridStack.Rows[i].Cells["Checked"].Value.ToString().ToLower() == "true")
                    {
                        strStackCode = this.gridStack.Rows[i].Cells["stackcode"].Value.ToString();
                        intCheckNum  = intCheckNum + 1;
                    }
                }

                if (intCheckNum != 1)
                {
                    //请选中一笔垛位
                    ApplicationRun.GetInfoForm().Add(
                        new UserControl.Message(MessageType.Error, "$CS_SELECT_ONLY_ONE_STACK"));
                }
                else
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("storagecode", this.gridStorage.ActiveRow.Cells["StoreroomCode"].Value.ToString());
                    ht.Add("stackcode", strStackCode);
                    ParentChildRelateEventArgs <Hashtable> args = new ParentChildRelateEventArgs <Hashtable>(ht);
                    this.OnStackInfoEvent(sender, args);
                    this.Close();
                }
            }
        }
Esempio n. 15
0
 void objForm_ProductInfoEvent(object sender, ParentChildRelateEventArgs <System.Collections.Hashtable> e)
 {
     this.txtItemCode.Value  = e.CustomObject["itemcode"].ToString();
     this.txtItemDescV.Value = e.CustomObject["itemdesc"].ToString();
 }
Esempio n. 16
0
 void selector_SoftVersionSelectedEvent(object sender, ParentChildRelateEventArgs <string> e)
 {
     this.ucLabelEditSoftVersion.Value = e.CustomObject;
 }
Esempio n. 17
0
 private void OPCodeSelector_OPCodeSelectedEvent(object sender, ParentChildRelateEventArgs <string> e)
 {
     this.txtOplistQuery.Value = e.CustomObject;
 }
Esempio n. 18
0
 /// <summary>
 /// 指定从选择界面获得的值
 /// </summary>
 private void ModelCodeSelector_ModelCodeSelectedEvent(object sender, ParentChildRelateEventArgs <string> e)
 {
     this.ucLabelEditModelCode.Value = e.CustomObject;
 }
Esempio n. 19
0
 private void BigSSCodeSelector_BigSSCodeSelectedEvent(object sender, ParentChildRelateEventArgs <string> e)
 {
     this.txtBigSSCode.Value = e.CustomObject;
 }
Esempio n. 20
0
        public void Form_Event(object sender, ParentChildRelateEventArgs <string> e)
        {
            string softWareVersion = e.CustomObject;

            this.ucLabelSoftVersion.Value = softWareVersion;
        }
Esempio n. 21
0
 public void Form_Event(object sender, ParentChildRelateEventArgs <string> e)
 {
     this.frozenReason = e.CustomObject;
 }