Ejemplo n.º 1
0
        private void FacChk_List(string condition)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.Fac_Chk_List(condition);

                this.dgv_FacList.RowCount = dt.Rows.Count;
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv_FacList.Rows[i].Cells["FIX_DATE"].Value = dt.Rows[i]["FIX_DATE"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_TIME"].Value = dt.Rows[i]["FIX_TIME"].ToString();
                        //dgv_FacList.Rows[i].Cells["FIX_GUBUN"].Value = dt.Rows[i]["FIX_GUBUN"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_CUST"].Value   = dt.Rows[i]["FIX_CUST"].ToString();
                        dgv_FacList.Rows[i].Cells["STAFF_NM"].Value   = dt.Rows[i]["STAFF_NM"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_REPORT"].Value = dt.Rows[i]["FIX_REPORT"].ToString();

                        if (dt.Rows[i]["FIX_GUBUN"].ToString().Equals("1"))
                        {
                            dgv_FacList.Rows[i].Cells["FIX_GUBUN"].Value = "정기점검";
                        }
                        else
                        {
                            dgv_FacList.Rows[i].Cells["FIX_GUBUN"].Value = "수리조치";
                        }
                    }
                }
                else
                {
                    dgv_FacList.Rows.Clear();
                }
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 2
0
        private void FacChk_List()
        {
            btnDelete.Enabled = false;

            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.Fac_Chk_List("");

                this.dgv_FacList.RowCount = dt.Rows.Count;
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv_FacList.Rows[i].Cells["FAC_NM"].Value     = dt.Rows[i]["FAC_NM"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_GUBUN"].Value  = dt.Rows[i]["FIX_GUBUN"].ToString();
                        dgv_FacList.Rows[i].Cells["STAFF_NM"].Value   = dt.Rows[i]["STAFF_NM"].ToString();
                        dgv_FacList.Rows[i].Cells["FAC_CD"].Value     = dt.Rows[i]["FAC_CD"].ToString();
                        dgv_FacList.Rows[i].Cells["STAFF_CD"].Value   = dt.Rows[i]["STAFF_CD"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_TIME"].Value   = dt.Rows[i]["FIX_TIME"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_COST"].Value   = dt.Rows[i]["FIX_COST"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_CUST"].Value   = dt.Rows[i]["FIX_CUST"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_REPORT"].Value = dt.Rows[i]["FIX_REPORT"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_SEQ"].Value    = dt.Rows[i]["FIX_SEQ"].ToString();
                        dgv_FacList.Rows[i].Cells["MODEL_NM"].Value   = dt.Rows[i]["MODEL_NM"].ToString();
                        dgv_FacList.Rows[i].Cells["FIX_DATE"].Value   = dt.Rows[i]["FIX_DATE"].ToString();
                    }
                }
                else
                {
                    dgv_FacList.Rows.Clear();
                }
            }
            catch (Exception ex)
            {
            }
        }