Beispiel #1
0
        private void gvCalcLog_SelectionChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            var id    = (int)gvCalcLog.GetRowCellValue(gvCalcLog.FocusedRowHandle, "id");
            var table = _history.GetTracing(id);

            gcCalcTracing.DataSource = table;
        }
Beispiel #2
0
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            if (saveMode == SaveMode.Insert)
            {
                return;
            }
            var row = gridView1.GetFocusedDataRow();

            userSelected = new User
            {
                UserID      = (int)row["UserID"],
                Address     = (string)row["Address"],
                Email       = (string)row["Email"],
                FullName    = (string)row["FullName"],
                Password    = (string)row["Password"],
                UserGroupID = (int)row["UserGroupId"],
                Username    = (string)row["UserName"]
            };

            if (row["DateOfBirth"] != DBNull.Value)
            {
                userSelected.DateOfBirth = (DateTime)row["DateOfBirth"];
            }

            textEditAddress.Text         = userSelected.Address;
            textEditEmail.Text           = userSelected.Email;
            textEditFullName.Text        = userSelected.FullName;
            textEditUsername.Text        = userSelected.Username;
            textEditUserID.Text          = userSelected.UserID.ToString();
            lookUpEditUerGroup.EditValue = row["UserGroupID"];
            dateEditBirthday.EditValue   = userSelected.DateOfBirth;
            saveMode = SaveMode.Update;
        }
 private void gridView2_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
 {
     simpleButtonHapus.Enabled  = true;
     simpleButtonSimpan.Enabled = false;
     simpleButtonUbah.Enabled   = true;
     textEdit1.Enabled          = false;
 }
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            if (saveMode == SaveMode.Insert)
            {
                return;
            }

            var row = gridView1.GetFocusedDataRow();

            if (row == null)
            {
                return;
            }
            int userGroupId = int.Parse(row["UserGroupID"].ToString());

            var permOfUserGroup = permissionBusiness.GetByUserGroupId(userGroupId);

            checkedListPermission.UnCheckAll();
            foreach (DataRow item in permOfUserGroup.Rows)
            {
                for (int j = 0; j < permissions.Rows.Count; j++)
                {
                    if (item["PermissionID"].Equals(permissions.Rows[j]["PermissionID"]))
                    {
                        checkedListPermission.SetItemChecked(j, true);
                    }
                }
            }

            textEditId.Text   = row["UserGroupID"].ToString();
            textEditName.Text = row["UserGroupName"].ToString();

            saveMode = SaveMode.Update;
        }
Beispiel #5
0
 private void gv_tmo_order_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
 {
     int    index      = gv_tmo_order.FocusedRowHandle;
     double NWGT       = Convert.ToDouble(gv_tmo_order.GetRowCellValue(index, "N_WGT"));
     double N_PROD_WGT = Convert.ToDouble(gv_tmo_order.GetRowCellValue(index, "N_PROD_WGT"));
     //this.txt_wgt.Text = (NWGT - N_PROD_WGT).ToString();
 }
        private void grdvBatchNos_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            grdPWOs.DataSource = null;

            int idx = grdvBatchNos.GetFocusedDataSourceRowIndex();

            if (idx >= 0 && idx < batchs.Count)
            {
                inspectionItems.Clear();
                dtInspection.Rows.Clear();
                dtInspection.Columns.Clear();
                vgrdInspectParams.Rows.Clear();

                BatchByEquipment batch = batchs[idx];
                pwos = GetPWOWithBatchNo(batch.BatchNumber);
                grdPWOs.DataSource = pwos;
            }
            else
            {
                pwos.Clear();
                grdPWOs.DataSource = null;
            }

            grdPWOs.RefreshDataSource();
            grdvPWOs.BestFitColumns();
        }
        private void WbGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            focused_row = e.Row as GetWayBillListWh_Result;
            WayBillListInfoBS.DataSource = focused_row;

            if (focused_row != null)
            {
                using (var db = DB.SkladBase())
                {
                    gridControl2.DataSource = db.GetWaybillDetIn(focused_row.WBillId).ToList();
                    gridControl3.DataSource = db.GetRelDocList(focused_row.Id).OrderBy(o => o.OnDate).ToList();
                }
            }
            else
            {
                gridControl2.DataSource = null;
                gridControl3.DataSource = null;
            }

            DeleteItemBtn.Enabled  = (focused_row != null && focused_row.Checked == 0 && focused_tree_node.CanDelete == 1);
            ExecuteItemBtn.Enabled = (focused_row != null && focused_row.WType != 2 && focused_row.WType != -16 && focused_row.WType != 16 && focused_tree_node.CanPost == 1);
            EditItemBtn.Enabled    = (focused_row != null && focused_tree_node.CanModify == 1);
            CopyItemBtn.Enabled    = EditItemBtn.Enabled;
            PrintItemBtn.Enabled   = (focused_row != null);
        }
Beispiel #8
0
 private void gridView3_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
 {
     simpleButtonUbahDetail.Enabled   = true;
     simpleButtonHapusDetail.Enabled  = true;
     simpleButtonsimpanDetail.Enabled = false;
     panelControl2.Enabled            = true;
 }
Beispiel #9
0
 private void WaybillDetOutGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
 {
     EditMaterialBtn.Enabled = GetWayBillMakeDetBS.Count > 0 /*&& wbd_row.IsIntermediateWeighing != 1*/;
     DelMaterialBtn.Enabled  = EditMaterialBtn.Enabled /*&& wbd_row.IsIntermediateWeighing != 1*/;
     RsvInfoBtn.Enabled      = GetWayBillMakeDetBS.Count > 0;
     MatInfoBtn.Enabled      = GetWayBillMakeDetBS.Count > 0;
 }
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            //Getting company information from the grid

            DataRow dataRow = gridView1.GetDataRow(gridView1.FocusedRowHandle);

            if (dataRow != null)
            {
                txtId.Text           = dataRow["ID"].ToString();
                txtAd.Text           = dataRow["AD"].ToString();
                txtYetkiliGorev.Text = dataRow["YETKILISTATU"].ToString();
                txtYetkili.Text      = dataRow["YETKILIADSOYAD"].ToString();
                mskTc.Text           = dataRow["YETKILITC"].ToString();
                txtSektor.Text       = dataRow["SEKTOR"].ToString();
                mskTelefon_1.Text    = dataRow["TELEFON1"].ToString();
                mskTelefon_2.Text    = dataRow["TELEFON2"].ToString();
                mskTelefon_3.Text    = dataRow["TELEFON3"].ToString();
                txtMail.Text         = dataRow["MAIL"].ToString();
                mskFax.Text          = dataRow["FAX"].ToString();
                cbxIl.Text           = dataRow["IL"].ToString();
                cbxIlce.Text         = dataRow["ILCE"].ToString();
                txtVergiDaire.Text   = dataRow["VERGIDAIRE"].ToString();
                rchAdres.Text        = dataRow["ADRES"].ToString();
                txtKod1.Text         = dataRow["OZELKOD1"].ToString();
                txtKod2.Text         = dataRow["OZELKOD2"].ToString();
                txtKod3.Text         = dataRow["OZELKOD3"].ToString();
            }
        }
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            if (e.FocusedRowHandle == -2147483648)
            {
                return;
            }
            if (e.FocusedRowHandle == -2147483646)
            {
                return;
            }
            if (e.FocusedRowHandle < 0)
            {
                return;
            }
            if (this._list == null)
            {
                return;
            }
            int dataSourceRowIndex             = this.gridView1.GetDataSourceRowIndex(e.FocusedRowHandle);
            SysConnectionString          sysCS = this._list[dataSourceRowIndex];
            FocusedSysCSChangedEventArgs args  = new FocusedSysCSChangedEventArgs( );

            args.FocusedRowHandle = e.FocusedRowHandle;
            args.FocusedSysCS     = sysCS;
            this.FocusedSysCSChangedEvent?.Invoke(this, args);
        }
Beispiel #12
0
        private void MatPriceGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            var row = MatPriceGridView.GetFocusedRow() as dynamic;

            DelPriceBtn.Enabled = (row.IsIndividually == 1);
            AddPriceBtn.Enabled = (row.IsIndividually == 0);
        }
Beispiel #13
0
        private void TechProcGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            focused_row = WbGridView.GetFocusedRow() as WBListMake_Result;

            DelTechProcBtn.Enabled  = ((focused_row != null && focused_row.Checked != 1 && focused_tree_node.CanModify == 1) && TechProcGridView.DataRowCount > 0);
            EditTechProcBtn.Enabled = (focused_row != null && focused_tree_node.CanModify == 1 && TechProcGridView.DataRowCount > 0 /*&& focused_row.Checked != 1*/);
        }
Beispiel #14
0
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            QC_Sample_Mix mix = e.Row as QC_Sample_Mix;

            if (mix != null)
            {
                vehs.LoadDataByWhere("main.Sample_mix_id=@Sample_mix_id", mix.Sample_Mix_ID);
            }
        }
Beispiel #15
0
 private void gridView2_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
 {
     //iki kodinge nyuk
     DetMasterBar();
     simpleButtonHapus.Enabled  = true;
     simpleButtonUbah.Enabled   = true;
     simpleButtonSimpan.Enabled = false;
     panelControl1.Enabled      = true;
 }
        private Bll_TB_MATRL_MAIN bll_wl = new Bll_TB_MATRL_MAIN();//物料信息表
        /// <summary>
        /// 选中炉次计划
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridView7_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            int index = gridView7.FocusedRowHandle;

            if (index < 0)
            {
                return;
            }
            string C_STL_GRD  = gridView7.GetRowCellValue(index, "C_STL_GRD").ToString();
            string C_STD_CODE = gridView7.GetRowCellValue(index, "C_STD_CODE").ToString();
            string C_ROUTE    = gridView7.GetRowCellValue(index, "C_ROUTE").ToString();
            int    N_GROUP    = Convert.ToInt32(gridView7.GetRowCellValue(index, "N_GROUP").ToString());

            #region 加载可修改的物料信息
            string wllj = "";
            if (C_ROUTE.Contains("LF") && C_ROUTE.Contains("RH"))
            {
                wllj = "(BLR)";
            }
            if (C_ROUTE.Contains("LF") && !C_ROUTE.Contains("RH"))
            {
                wllj = "(BL)";
            }
            if (!C_ROUTE.Contains("LF") && C_ROUTE.Contains("RH"))
            {
                wllj = "(BR)";
            }
            DataTable dtgpwl = null;//bll_wl.GetGPWL( C_STL_GRD,  C_STD_CODE, "", wllj);
            if (C_ROUTE.Contains("KP"))
            {
                dtgpwl = bll_wl.GetGPWL(C_STL_GRD, "", null, "6", wllj, "大方坯连铸坯").Tables[0];
            }
            else
            {
                dtgpwl = bll_wl.GetGPWL(C_STL_GRD, "", null, "6", wllj, "小方坯连铸坯").Tables[0];
            }
            this.gridControl5.DataSource = dtgpwl;
            this.gridView5.OptionsView.ColumnAutoWidth = false;
            SetGridViewRowNum.SetRowNum(gridView5);
            this.gridView5.BestFitColumns();
            #endregion

            #region 加载同组的可以变更的炉次计划

            List <Mod_TSP_PLAN_SMS> lst   = bll_plan_sms.GetListByJcGroup(N_GROUP);
            List <Mod_TSP_PLAN_SMS> lstkg = new List <Mod_TSP_PLAN_SMS>();
            var changelst = lst.Where(a => a.C_STL_GRD != C_STL_GRD || a.C_STD_CODE != C_STD_CODE).GroupBy(a => new { a.C_STD_CODE, a.C_STL_GRD, a.C_MATRL_NO }).ToList();
            if (changelst.Count > 0)
            {
                for (int i = 0; i < changelst.Count; i++)
                {
                    //  Mod_TSP_PLAN_SMS mod = bll_plan_sms.GetModelList();
                }
            }

            #endregion
        }
Beispiel #17
0
        private void WbGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            var focused_row = e.Row as WBListMake_Result;

            TechProcDetBS.DataSource = null;
            using (SPBaseModel _db = Database.SPBase())
            {
                TechProcDetBS.DataSource = _db.v_TechProcDet.Where(w => w.WbillId == focused_row.WbillId).OrderBy(o => o.Num).ToList();
            }
        }
Beispiel #18
0
        private void grdvPWOs_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            int idx = grdvPWOs.GetFocusedDataSourceRowIndex();

            if (idx >= 0 && idx < pwos.Count)
            {
                ucMPLH.RefreshUC(pwos[idx]);
                saveState = true;
            }
        }
Beispiel #19
0
        private void UsersGroupGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            var list = DB.SkladBase().v_IntermediateWeighingDet.Where(w => w.WbillId == focused_row.WbillId && w.MatId == focused_row.MatId).ToList().Select(s => new make_det
            {
                MsrName = s.MsrName,
                AmountIntermediateWeighing = s.Amount
            }).ToList();

            OkButton.Enabled = list.Count() < focused_row.RecipeCount;
        }
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            // otomatik olarak tabcontrol la bilgileri getiri ve tıklandıgında değiştirir

            TxtID.Text       = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VELIID").ToString();
            TxtAnneAd.Text   = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VELIANNE").ToString();
            TxtBabaAd.Text   = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VELIBABA").ToString();
            MskTelefon1.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VELITEL1").ToString();
            MskTelefon2.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VELITEL2").ToString();
            TxtMail.Text     = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "VELIMAIL").ToString();
        }
Beispiel #21
0
        private void grv_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            int id = (int)grv.GetFocusedRowCellValue(colID);

            lbCNM.Text   = cus.GetCustomer(id).CustomerName;
            lbADR.Text   = cus.GetCustomer(id).Address;
            lbPHN.Text   = cus.GetCustomer(id).PhoneNo;
            lbEML.Text   = cus.GetCustomer(id).Email;
            lbCSH.Text   = cus.GetCustomer(id).Balance.ToString();
            picPHO.Image = UserClass.Utils.ConvertImage(cus.GetCustomer(id).Photo);
        }
Beispiel #22
0
 private void gv_Main_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
 {
     try
     {
         NewMethod6();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);

            if (dr != null)
            {
                txtID.Text     = dr["ID"].ToString();
                txtBaslik.Text = dr["Başlık"].ToString();
                txtNot.Text    = dr["Notlar"].ToString();
            }
        }
Beispiel #24
0
        private void GridViewLog_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            var item   = gridViewLog.GetRow(gridViewLog.FocusedRowHandle) as Core.Model.LogLine;
            var exists = System.IO.Directory.Exists(item.Value);

            barButtonItemOpenFolder.Enabled     = exists;
            barButtonItemOpenTerminal.Enabled   = exists;
            barButtonItemOpenInNewWamby.Enabled = exists;
            barButtonItemCopyPath.Enabled       = exists;
            barButtonItemShowProperties.Enabled = exists;
            barButtonItemDelete.Enabled         = exists;
        }
Beispiel #25
0
        private void gridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
        {
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);

            txtAd.Text    = dr["M_Ad"].ToString();
            txtSoyad.Text = dr["M_Soyad"].ToString();
            cmbil.Text    = dr["M_il"].ToString();
            cmbilce.Text  = dr["M_ilce"].ToString();
            mtxtTel.Text  = dr["M_Tel"].ToString();
            mtxtMail.Text = dr["M_Mail"].ToString();
            txtAdres.Text = dr["M_Adres"].ToString();
        }