Esempio n. 1
0
        private void gv_GP1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            DataRow dr = gv_GP1.GetDataRow(0);

            if (dr != null)
            {
                string grd = "【" + dr["C_STL_GRD"].ToString() + "】";
                var    dt  = bll_TB_MATRL_MAIN.GetKPMatrlList(dr["C_STL_GRD"].ToString()).Tables[0];
                if (dt != null && dt.Rows.Count > 0)
                {
                    foreach (DataRow item in dt.Rows)
                    {
                        img_MatCode.Properties.Items.Add(grd + item["C_MAT_NAME"].ToString() + "~【" + item["C_SLAB_SIZE"].ToString() + "*" + item["N_LTH"].ToString() + "】", item["C_MAT_CODE"].ToString(), -1);
                    }
                }

                this.img_MatCode.EditValue = dr["C_MAT_CODE"].ToString();
                this.txt_PlanNum.Text      = (Convert.ToInt32(dr["N_QUA_TOTAL_VIRTUAL"])).ToString();
                int cogNum = int.Parse(this.txt_PlanNum.Text.ToString());
                if (cogNum == 0)
                {
                    this.txt_CogDownNum.Text = "0";
                }
                else
                {
                    this.txt_CogDownNum.Text = (cogNum * 2).ToString();
                }
                object obj = bll_TRC_ROLL_WGD.GetOutTime(dr["C_ID"].ToString());
                dt_ExecStart.DateTime    = obj == null ? DateTime.Now : DateTime.Parse(obj.ToString());
                this.dt_ExecEnd.DateTime = DateTime.Now;
            }
        }