コード例 #1
0
ファイル: dsLogon.Designer.cs プロジェクト: estimpson/Empire
 public virtual dsLogon.employeeDataTable GetData(string password)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if ((password == null))
     {
         throw new global::System.ArgumentNullException("password");
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[0].Value = ((string)(password));
     }
     dsLogon.employeeDataTable dataTable = new dsLogon.employeeDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
コード例 #2
0
ファイル: dsLogon.Designer.cs プロジェクト: estimpson/Empire
        public virtual int Fill(dsLogon.employeeDataTable dataTable, string password)
        {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((password == null))
            {
                throw new global::System.ArgumentNullException("password");
            }
            else
            {
                this.Adapter.SelectCommand.Parameters[0].Value = ((string)(password));
            }
            if ((this.ClearBeforeFill == true))
            {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);

            return(returnValue);
        }
コード例 #3
0
ファイル: Logon.cs プロジェクト: estimpson/Empire
        public void ValidatePassword(string connectionString, string password, out string opName, out string opCode, out string error)
        {
            opName = "";
            opCode = "";
            error  = "";
            try
            {
                using (var eta = new employeeTableAdapter())
                {
                    eta.Connection.ConnectionString = connectionString;
                    dsLogon.employeeDataTable edt = eta.GetData(password);

                    if (edt.Rows.Count > 0)
                    {
                        opName = edt[0].name;
                        opCode = edt[0].operator_code;
                    }
                }
            }
            catch (SqlException ex)
            {
                if (ex.InnerException != null)
                {
                    error = "Sql Exception: " + ex.InnerException.ToString();
                }
                else
                {
                    error = "Sql Exception: " + ex.Message;
                }
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    error = "Exception: " + ex.InnerException.ToString();
                }
                else
                {
                    error = "Exception: " + ex.Message;
                }
            }
        }
コード例 #4
0
ファイル: dsLogon.Designer.cs プロジェクト: estimpson/Empire
 public virtual int Update(dsLogon.employeeDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }