Exemplo n.º 1
0
        //修改详细订单信息;
        private void btn_editDetail_Click(object sender, EventArgs e)
        {
            if (AAonRating.aaon.OrderDtlRowNo > 0)
            {
                //设置datagridview2的默认行
                foreach (DataGridViewRow dvg in AAonRating.aaon.dataGridView2.Rows)
                {
                    if (dvg.Selected == true)
                    {
                        AAonRating.aaon.RowIndexDGV2 = (int)dvg.Cells[7].Value;
                        AAonRating.aaon.XuanXingType = (int)dvg.Cells[10].Value;
                    }
                }

                //弹出选型窗口
                if (AAonRating.aaon.XuanXingType == 1)
                {
                    int ModelID = AAonRating.aaon.ModelOdId;
                    CatalogBLL.copyOrderToCurrent(ModelID, 1);
                    XuanxingUI XxUI = new XuanxingUI(ModelID);
                    XxUI.tb_qty.Text = AAonRating.aaon.qty_text;
                    AAonRating.aaon.AddOrderDetail = false;
                    XxUI.Show();
                }

                //弹出选图窗口
                if (AAonRating.aaon.XuanXingType == 2)
                {
                    FrontPhotoImageModelService.route = "AAnonRating";
                    List<ImageModel> imageModelList = ImageModelBLL.getImageModels(AAonRating.aaon.ModelOdId);
                    List<ImageEntity> imageBoxList = FrontPhotoImageModelService.getImageEntityFromDataBase(imageModelList);
                    FrontPhotoImageModelService.imageEntityFromAAonRatingList = imageBoxList;
                    FrontPhotoImageModelService.orderId = AAonRating.aaon.ModelOdId;
                    List<CatalogModel> catalogModelList = UnitBLL.getPropertyModels(AAonRating.aaon.ModelOdId);
                    OperatePhotoNeedData tempOperatePhotoNeedData = new OperatePhotoNeedData();
                    for (int i = 0; i < catalogModelList.Count; i++)
                    {
                        CatalogModel catalogModel = catalogModelList.ElementAt(i);
                        if (catalogModel.PropertyName.Equals("Unit Size"))
                        {
                            tempOperatePhotoNeedData.unitSize = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Base Rail"))
                        {
                            tempOperatePhotoNeedData.baseRail = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Painting"))
                        {
                            tempOperatePhotoNeedData.paining = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Special"))
                        {
                            tempOperatePhotoNeedData.uniteSpecial = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Supply Air Flow"))
                        {
                            tempOperatePhotoNeedData.supplyAirFlow = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Type"))
                        {
                            tempOperatePhotoNeedData.unitType = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Voltage"))
                        {
                            tempOperatePhotoNeedData.voltage = catalogModel.Value;
                        }
                        else if (catalogModel.PropertyName.Equals("Wiring"))
                        {
                            tempOperatePhotoNeedData.wring = catalogModel.Value;
                        }
                    }
                    FrontPhotoImageModelService.operatePhotoNeedData = tempOperatePhotoNeedData;
                    OperatePhoto operatePhoto = new OperatePhoto();
                    operatePhoto.setOperatePhotoNeedData(tempOperatePhotoNeedData, AAonRating.aaon.ModelOdId);
                    operatePhoto.ShowDialog();

                }
            }
        }
Exemplo n.º 2
0
        //将窗体数据传递给调用窗体
        private void ok_button_Click(object sender, EventArgs e)
        {
            OperatePhotoNeedData dataDeatil = new OperatePhotoNeedData();
            dataDeatil.orderID = orderID;
            if (unitType.SelectedIndex == -1)
                dataDeatil.unitType = unitType.Text.ToString();
            else
                dataDeatil.unitType = unitType.SelectedValue.ToString();

            if (unitSize.SelectedIndex == -1)
                dataDeatil.unitSize = unitSize.Text.ToString();
            else
                dataDeatil.unitSize = unitSize.SelectedValue.ToString();

            if (SupplyAiFl.SelectedIndex == -1)
                dataDeatil.supplyAirFlow = SupplyAiFl.Text.ToString();
            else
                dataDeatil.supplyAirFlow = SupplyAiFl.SelectedValue.ToString();

            if (voltage.SelectedIndex == -1)
                dataDeatil.voltage = voltage.Text.ToString();
            else
                dataDeatil.voltage = voltage.SelectedValue.ToString();

            if (assembly.SelectedIndex == -1)
                dataDeatil.assembly = assembly.Text.ToString();
            else
                dataDeatil.assembly = assembly.SelectedValue.ToString();

            if (wiring.SelectedIndex == -1)
                dataDeatil.wring = wiring.Text.ToString();
            else
                dataDeatil.wring = wiring.SelectedValue.ToString();

            if (painting.SelectedIndex == -1)
                dataDeatil.paining = painting.Text.ToString();
            else
                dataDeatil.paining = painting.SelectedValue.ToString();

            if (baseRail.SelectedIndex == -1)
                dataDeatil.baseRail = baseRail.Text.ToString();
            else
                dataDeatil.baseRail = baseRail.SelectedValue.ToString();

            if (unitSpec.SelectedIndex == -1)
                dataDeatil.uniteSpecial = unitSpec.Text.ToString();
            else
                dataDeatil.uniteSpecial = unitSpec.SelectedValue.ToString();

            if (radioButton1.Checked == true)
                dataDeatil.startUnitAs = "Basic Air Handler";
            else
                dataDeatil.startUnitAs = "Energy Recovery Wheel Air Handler";

            dataDeatil.unitTag = textBox1.Text;
            FrontPhotoImageModelService.operatePhotoNeedData = dataDeatil;
            FrontPhotoImageModelService.orderId = dataDeatil.orderID;
            FrontPhotoService.startUnitAs = dataDeatil.startUnitAs;
            if(dataDeatil.baseRail!="0"){
                //控制支架高度
                if(dataDeatil.baseRail=="A")
                BaseRail.baseRail = 4;
                if (dataDeatil.baseRail == "B")
                BaseRail.baseRail = 8;
                if (dataDeatil.baseRail == "C")
                BaseRail.baseRail = 6;
            }
            if (this.parentForm == null)
            {

                FrontPhotoService.coolingType =Convert.ToInt32(dataDeatil.unitSize);
                OperatePhoto operatePhoto = new OperatePhoto();
                operatePhoto.setOperatePhotoNeedData(dataDeatil, OrderIDToMod);
                operatePhoto.ShowDialog();
                this.Close();
            }
            else
            {
                OperatePhoto operatePhoto = (OperatePhoto)parentForm;
                operatePhoto.setOperatePhotoNeedData(dataDeatil, OrderIDToMod);
                operatePhoto.refreshedByModAhUint(FrontPhotoImageModelService.currentTagIndex);
                operatePhoto.reFreshEdByReplace(FrontPhotoImageModelService.currentTagIndex);
                operatePhoto.reFreshRightPanelByCoolingType(Convert.ToInt32(dataDeatil.unitSize));
                this.Close();
            }
        }