示例#1
0
        private void SetClassProperties()
        {
            // DO NOT INCLUDE KEY !!!
            var sqlParameters = new List <SqlParameter>();

            ModelController.AddParameter(sqlParameters, "?account_code", AccountCode);
            ModelController.AddParameter(sqlParameters, "?account_title", AccountTitle);
            ModelController.AddParameter(sqlParameters, "?amount", Amount);
            ModelController.AddParameter(sqlParameters, "?year", Year);
            Parameters = sqlParameters;
        }
示例#2
0
        private void SetClassProperties()
        {
            // DO NOT INCLUDE KEY !!!
            var sqlParameters = new List <SqlParameter>();

            ModelController.AddParameter(sqlParameters, "?ACC_CODE", AccountCode);
            ModelController.AddParameter(sqlParameters, "?TITLE", AccountTitle);
            ModelController.AddParameter(sqlParameters, "?DOC_DATE", DocumentDate);
            ModelController.AddParameter(sqlParameters, "?DOC_NUM", DocumentNo);
            ModelController.AddParameter(sqlParameters, "?DOC_TYPE", DocumentType);
            ModelController.AddParameter(sqlParameters, "?DEBIT", Debit);
            ModelController.AddParameter(sqlParameters, "?CREDIT", Credit);
            Parameters = sqlParameters;
        }
示例#3
0
        private List <SqlParameter> GetSqlParameters()
        {
            var sqlParameters = new List <SqlParameter>();

            ModelController.AddParameter(sqlParameters, "?order_no", OrderNo);
            ModelController.AddParameter(sqlParameters, "?indent", Indent);
            ModelController.AddParameter(sqlParameters, "?account_code", AccountCode);
            ModelController.AddParameter(sqlParameters, "?account_title", AccountTitle);
            ModelController.AddParameter(sqlParameters, "?end_balance_formula", EndBalanceFormula);
            ModelController.AddParameter(sqlParameters, "?group_balance_formula", GroupBalanceFormula);
            ModelController.AddParameter(sqlParameters, "?operator", Operator);
            ModelController.AddParameter(sqlParameters, "?is_end_balance_underlined", IsEndBalanceUnderlined);
            ModelController.AddParameter(sqlParameters, "?is_group_balance_underlined", IsGroupBalanceUnderlined);

            return(sqlParameters);
        }
示例#4
0
文件: Area.cs 项目: mudasar/scco
        public Result Update()
        {
            Action updateRecord = () =>
            {
                var key = new SqlParameter("?ID", ID);

                var sqlParameters = new List <SqlParameter>();
                ModelController.AddParameter(sqlParameters, "?AreaName", AreaName);

                var sql = DatabaseController.GenerateUpdateStatement(TABLE_NAME, sqlParameters, key);
                sqlParameters.Add(key);
                DatabaseController.ExecuteNonQuery(sql, sqlParameters.ToArray());
            };

            return(ActionController.InvokeAction(updateRecord));
        }