Beispiel #1
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            List <SQLObj> listSql   = new List <SQLObj>();
            List <string> listField = new List <string>();
            string        opName    = "预约单导入到接待单";

            #region 获取信息Id值
            string strRId = string.Empty;
            foreach (DataGridViewRow dr in dgvRData.Rows)
            {
                object isCheck = dr.Cells["colCheck"].EditedFormattedValue;
                if (isCheck != null && (bool)isCheck)
                {
                    strRId += dr.Cells["reserv_id"].Value.ToString();
                    listField.Add(dr.Cells["reserv_id"].Value.ToString());
                }
            }
            #endregion
            if (listField.Count <= 0)
            {
                MessageBoxEx.Show("请选择需要导入的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                return;
            }
            if (listField.Count > 1)
            {
                MessageBoxEx.Show("一次仅能导入1条数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                return;
            }
            uc.strBefore_orderId = strRId;  //导入单据的Id值
            uc.strOrdersSouse    = "1";
            uc.BindReserveData();
            this.Close();
            // strRId = strRId.Substring(0, strRId.Length - 1);
            // ImportReserData(listSql, strRId);
            // ImportPData(listSql, strId, strReservId);
            // ImportMData(listSql, strId, strReservId);
            // ImportOData(listSql, strId, strReservId);
            // ImportAData(listSql, strId, strReservId);
            //// UpdateMaintainNo(listSql, strReservId, strNewMaintainNo);
            // if (DBHelper.BatchExeSQLMultiByTrans(opName, listSql))
            // {
            //     MessageBoxEx.Show("导入成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
            //     this.Close();
            // }
        }
Beispiel #2
0
 private void dgvRData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         uc.strBefore_orderId = dgvRData.Rows[e.RowIndex].Cells["repair_id"].Value.ToString();  //导入单据的Id值
         uc.strOrdersSouse    = "2";
         uc.BindReserveData();
         this.Close();
     }
 }