Beispiel #1
0
 public CreditControlViewModel()
 {
     selectCreditControl = new CreditControlModel();
     selectCreditControl.ACCOUNT_OPENED   = System.DateTime.Now;
     selectCreditControl.APPLICATION_DATE = System.DateTime.Now;
     selectCreditControl.DATE_RECEIVED    = System.DateTime.Now;
     //.PAYMENT_FROM = System.DateTime.Now;
 }
Beispiel #2
0
        public HttpResponseMessage CreateCreditControl(CreditControlModel _CreditControlModel)
        {
            try
            {
                CUSTOMER_CREDIT_CONTROL cm = new CUSTOMER_CREDIT_CONTROL();
                cm.CREDIT_LIMIT        = _CreditControlModel.CREDIT_LIMIT;
                cm.SETTLEMENT_DUE_DAYS = _CreditControlModel.SETTLEMENT_DUE;
                cm.SETTLEMENT_DISCOUNT = _CreditControlModel.SETTLEMENT_DISCOUNT;
                cm.PAYMENT_DUE_DAYS    = _CreditControlModel.PAYMENT_DUE;
                cm.AVG_TIME            = _CreditControlModel.AVG_TIME;
                cm.PAYMENT_DUE_FROM    = _CreditControlModel.PAYMENT_FROM;
                cm.TRADING_TERMS       = _CreditControlModel.TREDING_TERMS;
                cm.CREDIT_REF          = _CreditControlModel.CREDIT_REF;
                cm.PRIORITY_CUSTOMER   = _CreditControlModel.IS_PRIORITY;
                cm.BUREAU          = _CreditControlModel.BUREAU;
                cm.CREDIT_POSITION = _CreditControlModel.CREDIT_POSITION;
                cm.ACCOUNT_STATES  = _CreditControlModel.ACCOUNT_STATUS;
                cm.DUNS_NUMBER     = _CreditControlModel.DUNS_NUMBER;
                cm.ACCOUNT_OPENED  = _CreditControlModel.ACCOUNT_OPENED;

                cm.LAST_CREDIT_REVIEW = _CreditControlModel.LAST_CREDIT;
                cm.NEXT_CREDIT_REVIEW = _CreditControlModel.NEXT_CREDIT;
                cm.APPLICATION_DATE   = _CreditControlModel.APPLICATION_DATE;
                cm.DATE_RECEIVED      = _CreditControlModel.DATE_RECEIVED;
                cm.DUNS_NUMBER        = _CreditControlModel.DUNS_NUMBER;
                cm.MEMO = _CreditControlModel.MEMO;


                cm.CUSTOMER_CODE       = _CreditControlModel.CUSTOMER_CODE;
                cm.IS_CHANGE_CREDIT    = _CreditControlModel.IS_CHANGE_CREDIT;
                cm.IS_TERMS_AGREED     = _CreditControlModel.IS_TERMS_AGREED;
                cm.IS_RESTRICT_MAILING = _CreditControlModel.IS_RESTRICT_MAILING;
                cm.IS_ACCOUNT_HOLD     = _CreditControlModel.IS_ACCOUNT_HOLD;
                cm.IS_DELETE           = false;
                db.CUSTOMER_CREDIT_CONTROL.Add(cm);
                db.SaveChanges();
            }
            catch (Exception)
            {
                throw;
            }
            return(Request.CreateResponse(HttpStatusCode.OK, "success"));
        }