Пример #1
0
        /// <summary>
        /// 存储函数
        /// Modify by xlb 2013-03-28
        /// </summary>
        /// <param name="status">状态</param>
        /// <param name="saveNolist">保存集合</param>
        private void BatchSave(int status /*状态*/, ref List <string> saveNolist)
        {
            try
            {
                Application.DoEvents();
                EMR_RECORDWRITEUP obj = new EMR_RECORDWRITEUP();
                for (int i = 0; i < selection.SelectedCount; i++)
                {
                    //赋值语句
                    obj.APPLYTIMES = int.Parse(this.txtTimes.Text.Trim());
                    //复选框选择非其他补写目的时 补写理由使用其文本
                    //否则开放补写理由编辑

                    obj.STATUS     = status;
                    obj.APPLYDOCID = m_sUser;//登录用户ID
                    DataRowView dataRow = (DataRowView)Selection.selection[i];
                    obj.NOOFINPAT    = dataRow["NOOFINPAT"].ToString();
                    obj.APPLYCONTENT = memoReason.Text.Trim();
                    if (IsExistApply(obj.NOOFINPAT))
                    {
                        //nolist.Add(dataRow["NAME"].ToString());
                    }
                    else
                    {
                        DaoCommand.InsertObjectCommand(obj);
                        saveNolist.Add(dataRow["NAME"].ToString() + "(" + obj.NOOFINPAT + ")");
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #2
0
        /// <summary>
        /// 存储函数
        /// Modify by xlb 2013-03-28
        /// </summary>
        /// <param name="status">状态</param>
        /// <param name="saveNolist">保存集合</param>
        private void BatchSave(int status /*状态*/, ref List <string> saveNolist)
        {
            try
            {
                Application.DoEvents();
                EMR_RecordBorrow obj = new EMR_RecordBorrow();
                for (int i = 0; i < selection.SelectedCount; i++)
                {
                    //赋值语句
                    obj.APPLYTIMES = int.Parse(this.txtTimes.Text.Trim());
                    //复选框选择非其他借阅目的时 借阅理由使用其文本
                    //否则开放借阅理由编辑
                    if (memoReason.Properties.ReadOnly)
                    {
                        //obj.APPLYCONTENT = this.memoReason.Text.Trim();
                        obj.APPLYCONTENT = rdgPurpose.Properties.Items[rdgPurpose.SelectedIndex].Description;
                    }
                    else
                    {
                        obj.APPLYCONTENT = memoReason.Text.Trim();
                    }
                    obj.STATUS     = status;
                    obj.APPLYDOCID = m_sUser;//登录用户ID
                    DataRowView dataRow = (DataRowView)Selection.selection[i];
                    obj.NOOFINPAT = dataRow["NOOFINPAT"].ToString();

                    if (IsExistApply(obj.NOOFINPAT))
                    {
                        //nolist.Add(dataRow["NAME"].ToString());
                    }
                    else
                    {
                        DaoCommand.InsertObjectCommand(obj);
                        saveNolist.Add(dataRow["NAME"].ToString() + "(" + obj.NOOFINPAT + ")");
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }