コード例 #1
0
ファイル: GR_CardsFolder.aspx.cs プロジェクト: riyuexing/rms
    /// <summary>
    ///
    /// </summary>
    protected void btSearch_Click(object sender, EventArgs e)
    {
        GK_OA_CardsFolderQueryModel cfQueryModel = new GK_OA_CardsFolderQueryModel();

        cfQueryModel.QueryConditionStr = this._ConstructQueryString();
        GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL();

        this.GridView1.DataSource = cfBFL.GetGK_OA_CardsFolderList(cfQueryModel);
        this.GridView1.DataBind();
    }
コード例 #2
0
ファイル: GK_OA_CardsFolderDAL.cs プロジェクト: riyuexing/rms
        private List <GK_OA_CardsFolderModel> _Select(GK_OA_CardsFolderQueryModel qmObj)
        {
            List <GK_OA_CardsFolderModel> list = new List <GK_OA_CardsFolderModel>();
            StringBuilder builder = new StringBuilder();

            builder.Append("select * from GK_OA_CardsFolder ");
            builder.Append(qmObj.QueryConditionStr);
            if (qmObj.SortColumns.Length == 0)
            {
                builder.Append(" ORDER BY Code desc");
            }
            else
            {
                builder.Append(" ORDER BY " + qmObj.SortColumns);
            }
            this._DataProcess.CommandText   = builder.ToString();
            this._DataProcess.SqlParameters = qmObj.Parameters;
            SqlDataReader sqlDataReader = null;
            int           num           = 0;

            try
            {
                try
                {
                    sqlDataReader = this._DataProcess.GetSqlDataReader();
                    while (sqlDataReader.Read())
                    {
                        if ((num >= qmObj.StartRecord) && ((list.Count < qmObj.MaxRecords) || (qmObj.MaxRecords == -1)))
                        {
                            GK_OA_CardsFolderModel model = new GK_OA_CardsFolderModel();
                            this.Initialize(sqlDataReader, model);
                            list.Add(model);
                        }
                        num++;
                    }
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            finally
            {
                if (sqlDataReader != null)
                {
                    sqlDataReader.Close();
                }
            }
            return(list);
        }
コード例 #3
0
ファイル: GR_CardsFolder.aspx.cs プロジェクト: riyuexing/rms
    /// <summary>
    /// 根据UserID,加载个人名片夹到桌面显示
    /// </summary>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!user.HasRight("350101"))
        {
            this.NewButton.Visible = false;
        }
        GK_OA_CardsFolderQueryModel cfQueryModel = new GK_OA_CardsFolderQueryModel();

        cfQueryModel.UserIdEqual = user.UserID;
        GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL();

        this.GridView1.DataSource = cfBFL.GetGK_OA_CardsFolderList(cfQueryModel);
        this.GridView1.DataBind();
    }
コード例 #4
0
ファイル: GK_OA_CardsFolderBFL.cs プロジェクト: ishui/rms2
        public List <GK_OA_CardsFolderModel> GetGK_OA_CardsFolderList(string SortColumns, int StartRecord, int MaxRecords, int CodeEqual, string UserIdEqual, string UserNameEqual, string SexEqual, int AgeEqual, string CompanyNameEqual, string CompanyAddressEqual, string DeptEqual, string HeadshipEqual, string PostalcodeEqual, string PhoneEqual, string FaxEqual, string MobileEqual, string EmailEqual, string NetAddressEqual, string HobbyEqual, string HomeAddressEqual, string WedlockEqual, string CardTypeEqual, string NativePlaceEqual, DateTime BirthdayEqual, DateTime ContactTimeEqual, string RemarkEqual, string HomePhoneEqual)
        {
            List <GK_OA_CardsFolderModel> models        = new List <GK_OA_CardsFolderModel>();
            GK_OA_CardsFolderQueryModel   objQueryModel = new GK_OA_CardsFolderQueryModel();

            objQueryModel.StartRecord         = StartRecord;
            objQueryModel.MaxRecords          = MaxRecords;
            objQueryModel.SortColumns         = SortColumns;
            objQueryModel.CodeEqual           = CodeEqual;
            objQueryModel.UserIdEqual         = UserIdEqual;
            objQueryModel.UserNameEqual       = UserNameEqual;
            objQueryModel.SexEqual            = SexEqual;
            objQueryModel.AgeEqual            = AgeEqual;
            objQueryModel.CompanyNameEqual    = CompanyNameEqual;
            objQueryModel.CompanyAddressEqual = CompanyAddressEqual;
            objQueryModel.DeptEqual           = DeptEqual;
            objQueryModel.HeadshipEqual       = HeadshipEqual;
            objQueryModel.PostalcodeEqual     = PostalcodeEqual;
            objQueryModel.PhoneEqual          = PhoneEqual;
            objQueryModel.FaxEqual            = FaxEqual;
            objQueryModel.MobileEqual         = MobileEqual;
            objQueryModel.EmailEqual          = EmailEqual;
            objQueryModel.NetAddressEqual     = NetAddressEqual;
            objQueryModel.HobbyEqual          = HobbyEqual;
            objQueryModel.HomeAddressEqual    = HomeAddressEqual;
            objQueryModel.WedlockEqual        = WedlockEqual;
            objQueryModel.CardTypeEqual       = CardTypeEqual;
            objQueryModel.NativePlaceEqual    = NativePlaceEqual;
            objQueryModel.BirthdayEqual       = BirthdayEqual;
            objQueryModel.ContactTimeEqual    = ContactTimeEqual;
            objQueryModel.RemarkEqual         = RemarkEqual;
            objQueryModel.HomePhoneEqual      = HomePhoneEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new GK_OA_CardsFolderBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
コード例 #5
0
ファイル: GK_OA_CardsFolderBFL.cs プロジェクト: ishui/rms2
        public List <GK_OA_CardsFolderModel> GetGK_OA_CardsFolderList(GK_OA_CardsFolderQueryModel QueryModel)
        {
            List <GK_OA_CardsFolderModel> models = new List <GK_OA_CardsFolderModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    if (QueryModel == null)
                    {
                        QueryModel = new GK_OA_CardsFolderQueryModel();
                    }
                    models = new GK_OA_CardsFolderBLL().GetModels(QueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
コード例 #6
0
ファイル: GK_OA_CardsFolderDAL.cs プロジェクト: riyuexing/rms
 public List <GK_OA_CardsFolderModel> Select(GK_OA_CardsFolderQueryModel qmObj)
 {
     return(this._Select(qmObj));
 }
コード例 #7
0
ファイル: GK_OA_CardsFolderDAL.cs プロジェクト: riyuexing/rms
        public List <GK_OA_CardsFolderModel> Select()
        {
            GK_OA_CardsFolderQueryModel qmObj = new GK_OA_CardsFolderQueryModel();

            return(this._Select(qmObj));
        }
コード例 #8
0
ファイル: GK_OA_CardsFolderBLL.cs プロジェクト: riyuexing/rms
        public List <GK_OA_CardsFolderModel> GetModels(GK_OA_CardsFolderQueryModel ObjQueryModel, SqlTransaction Transaction)
        {
            GK_OA_CardsFolderDAL rdal = new GK_OA_CardsFolderDAL(Transaction);

            return(rdal.Select(ObjQueryModel));
        }