标题:C#中总是提示并不包含Register方法,请问什么原因?如何解决!
只看楼主
zihaobiao
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-10-18
 问题点数:0 回复次数:0 
C#中总是提示并不包含Register方法,请问什么原因?如何解决!
原代码如下: private void btSave_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                if (!CheckBeforeSave()) return;
                WaybillcodeKind objWaybillcodeKind = new WaybillcodeKind();
                WaybillcodekindColumns objWaybillcodekindColumns = new WaybillcodekindColumns();
                gbSet.BuildColumns(objWaybillcodekindColumns);
                DataSet dsSaveResult = objWaybillcodeKind.Register(objWaybillcodekindColumns, GlobalData.OperID.ToString(), "false");//这里总是提示"Leis.View.EnterpriseSupport.WaybillcodeKind"并不包含Register的定义是什么原因啊?怎么解决?
                if (DataSetUtil.IsNull(dsSaveResult) || dsSaveResult.Tables.Count < 2 || DataTableUtil.IsNull(dsSaveResult.Tables[1]))
                {
                    string strErroeMessage = string.Empty;
                    if (dsSaveResult.Tables[0].Columns.Count > 1 && dsSaveResult.Tables[0].Rows.Count > 0)
                        strErroeMessage = dsSaveResult.Tables[0].Rows[0]["Column1"].ToString();
                    MessageBox.Show("保存失败" + strErroeMessage, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                MessageBox.Show("保存成功", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                dgvWaybillcodeKind.DataSource = dsSaveResult.Tables[1];
                gbSet.SetData(dsSaveResult.Tables[1].Rows[0]);
            }
            catch (Exception ex)
            {
                MessageBox.Show("保存失败,失败原因:" + ex.Message, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
        #endregion
搜索更多相关主题的帖子: 如何 private return 
2011-10-18 11:08



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-352798-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.780072 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved