public int InsertAuditData([Parameter(Name = "User_ID", DbType = "Int")] System.Nullable <int> user_ID, [Parameter(Name = "User_Name", DbType = "VarChar(50)")] string user_Name, [Parameter(Name = "Module_ID", DbType = "Int")] System.Nullable <int> module_ID, [Parameter(Name = "Module_Name", DbType = "VarChar(50)")] string module_Name, [Parameter(Name = "Screen_Name", DbType = "VarChar(50)")] string screen_Name, [Parameter(Name = "Slot", DbType = "VarChar(50)")] string slot, [Parameter(Name = "Aud_Field", DbType = "VarChar(500)")] string aud_Field, [Parameter(Name = "Old_Value", DbType = "VarChar(500)")] string old_Value, [Parameter(Name = "New_Value", DbType = "VarChar(500)")] string new_Value, [Parameter(Name = "Aud_Desc", DbType = "VarChar(500)")] string aud_Desc, [Parameter(Name = "Operation_Type", DbType = "VarChar(25)")] string operation_Type)
        {
            try
            {
                IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), user_ID, user_Name, module_ID, module_Name, screen_Name, slot, aud_Field, old_Value, new_Value, aud_Desc, operation_Type);
                return((int)(result.ReturnValue));
            }
            catch (Exception ex)
            {
                NameValueCollection nVC = new NameValueCollection();
                nVC.Add("User_ID", user_ID.ToString());
                nVC.Add("User_Name", user_Name);
                nVC.Add("module_ID", module_ID.ToString());
                nVC.Add("module_Name", module_Name);
                nVC.Add("screen_Name", screen_Name);
                nVC.Add("slot", slot);
                nVC.Add("aud_Field", aud_Field);
                nVC.Add("old_Value", old_Value);
                nVC.Add("new_Value", new_Value);
                nVC.Add("aud_Desc", aud_Desc);
                nVC.Add("operation_Type", operation_Type);

                ex.Source = "AuditViewer";

                ExceptionManager.Publish(ex, nVC);
                return(-1);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Sestaveni retezce pro podpis platebniho prikazu.
 /// </summary>
 ///
 /// <param name="gopayId">identifikator prijemce prideleny GoPay</param>
 /// <param name="productName">popis objednavky zobrazujici se na platebni brane</param>
 /// <param name="totalPriceInCents">celkova cena objednavky v halerich</param>
 /// <param name="currency">identifikator meny platby</param>
 /// <param name="OrderNumber">identifikator objednavky u prijemce</param>
 /// <param name="failedURL">URL stranky, kam je zakaznik presmerovan po zruseni platby / neuspesnem zaplaceni</param>
 /// <param name="successURL">URL stranky, kam je zakaznik presmerovan po uspesnem zaplaceni</param>
 /// <param name="preAuthorization">jedna-li se o predautorizovanou platbu true => 1, false => 0, null=>""</param>
 /// <param name="recurrentPayment">jedna-li se o opakovanou platbu true => 1, false => 0, null=>""</param>
 /// <param name="recurrenceDateTo">do kdy se ma opakovana platba provadet</param>
 /// <param name="recurrenceCycle">frekvence opakovane platby - mesic/tyden/den</param>
 /// <param name="recurrencePeriod">pocet jednotek opakovani ($recurrencePeriod=3 ~ opakování jednou za tři jednotky (mesic/tyden/den))</param>
 /// <param name="paymentChannel">platebni kanaly</param>
 /// <param name="secureKey">kryptovaci klic prideleny prijemci, urceny k podepisovani komunikace</param>
 ///
 /// <returns>retezec pro podpis</returns>
 public static string ConcatPaymentCommand(
     long gopayId,
     string productName,
     long totalPriceInCents,
     string currency,
     string orderNumber,
     string failedURL,
     string successURL,
     System.Nullable <bool> preAuthorization,
     System.Nullable <bool> recurrentPayment,
     string recurrenceDateTo,
     string recurrenceCycle,
     System.Nullable <long> recurrencePeriod,
     string paymentChannels,
     string secureKey)
 {
     return(gopayId.ToString() + "|" +
            productName + "|" +
            totalPriceInCents.ToString() + "|" +
            currency.ToString() + "|" +
            orderNumber + "|" +
            failedURL + "|" +
            successURL + "|" +
            CastBooleanForWS(preAuthorization) + "|" +
            CastBooleanForWS(recurrentPayment) + "|" +
            ((recurrenceDateTo != null) ? recurrenceDateTo : "") + "|" +
            ((recurrenceCycle != null) ? recurrenceCycle : "") + "|" +
            ((recurrencePeriod != null) ? recurrencePeriod.ToString() : "") + "|" +
            paymentChannels + "|" +
            secureKey);
 }
Esempio n. 3
0
 public ActionResult QuestionAddEditPartial(System.Nullable <Guid> QuestionId, System.Nullable <Guid> ExamId)
 {
     ViewBag.ExamId = ExamId.ToString();
     return(PartialView("_questionAddEditPartial", unitOfWork.QuestionRepo.Get(filter: m => m.QuestionId == QuestionId && m.ExamId == ExamId).FirstOrDefault() ?? new Question()
     {
         ExamId = ExamId.Value
     }));
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            ServicioMotorCalculoService objServicio = new ServicioMotorCalculoService();

            try
            {
                string sCodCampo       = Request.QueryString["CodCampo"].ToString();
                string sCodResponsable = Request.QueryString["CoResponsable"].ToString();

                var Cotizacion = objServicio.getCotizacion(sCodCampo, sCodResponsable);

                var objCotizacion = Cotizacion[0];

                //Cargamos Datos Afiliado
                lblAfiliado.Text = objCotizacion.afiliado.ToString();
                lblDNI.Text      = objCotizacion.dni.ToString();

                //Cargamos datos de la solicitud
                lblAfiliado2.Text       = objCotizacion.nombres;
                lblPaterno.Text         = objCotizacion.apellidoPaterno;
                lblMaterno.Text         = objCotizacion.apellidoMaterno;
                lblFechaSolicitud.Text  = objCotizacion.fechaSolicitud;
                lblFechaRecepcion.Text  = objCotizacion.fechaRecepcion;
                lblNumeroOperacion.Text = objCotizacion.nroOperacion;

                //Cargamos los servicios
                var query = from a in objCotizacion.AServicios.AsEnumerable()
                            select a;

                System.Nullable <Decimal> totalServicios = (from a in objCotizacion.AServicios.AsEnumerable()
                                                            select Decimal.Parse(a.importe)).Sum();

                lblTotalServicio.Text = totalServicios.ToString();

                gvServicios.DataSource = query.ToList();
                gvServicios.DataBind();


                //Cargamos los juegos
                var query1 = from a in objCotizacion.AJuegos.AsEnumerable()
                             select a;

                System.Nullable <Decimal> totalJuegos = (from a in objCotizacion.AJuegos.AsEnumerable()
                                                         select Decimal.Parse(a.importe)).Sum();

                lblTotalJuegos.Text = totalJuegos.ToString();

                gvJuegos.DataSource = query1.ToList();;
                gvJuegos.DataBind();


                lblTotalCotizacion.Text = (totalServicios + totalJuegos).ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 5
0
 public static string InsertOrder(bool bPromos, string bFirst, string bLast, string bComp, string bAddr1, string bAddr2, string bCity, string bState, string bZip, string bCountry, string bEmail, string bPhone, string sFirst, string sLast, string sCompany, string sAddr1, string sAddr2, string sCity, string sState, string sZip, string sCountry, string sEmail, string sPhone, string strPersonalMessage, string strDesc, int Quantity, decimal Amount, decimal subtotal, string shippingtype, decimal shippingamount, decimal total)
 {
     CafeDeluxeTableAdapters.QueriesTableAdapter sta = new global::CafeDeluxe.CafeDeluxeTableAdapters.QueriesTableAdapter();
     System.Nullable<int> bsi = new System.Nullable<int>();
     System.Nullable<int> ii = new System.Nullable<int>();
     System.Nullable<int> oi = new System.Nullable<int>();
     sta.InsertAllOrderInfo(bFirst, bLast, bComp, bAddr1, bAddr2, bCity, bState, bZip, bCountry, bEmail, bPhone, sFirst, sLast, sCompany, sAddr1, sAddr2, sCity, sState, sZip, sCountry, sEmail, sPhone, bPromos, strPersonalMessage, ref bsi, strDesc, Quantity, Amount, ref ii, subtotal, shippingtype, shippingamount, total, ref oi);
     return oi.ToString();
 }
Esempio n. 6
0
 public static string InsertOrder(bool bPromos, string bFirst, string bLast, string bComp, string bAddr1, string bAddr2, string bCity, string bState, string bZip, string bCountry, string bEmail, string bPhone, string sFirst, string sLast, string sCompany, string sAddr1, string sAddr2, string sCity, string sState, string sZip, string sCountry, string sEmail, string sPhone, string strPersonalMessage, string strDesc, int Quantity, decimal Amount, decimal subtotal, string shippingtype, decimal shippingamount, decimal total)
 {
     CafeDeluxeTableAdapters.QueriesTableAdapter sta = new global::CafeDeluxe.CafeDeluxeTableAdapters.QueriesTableAdapter();
     System.Nullable <int> bsi = new System.Nullable <int>();
     System.Nullable <int> ii  = new System.Nullable <int>();
     System.Nullable <int> oi  = new System.Nullable <int>();
     sta.InsertAllOrderInfo(bFirst, bLast, bComp, bAddr1, bAddr2, bCity, bState, bZip, bCountry, bEmail, bPhone, sFirst, sLast, sCompany, sAddr1, sAddr2, sCity, sState, sZip, sCountry, sEmail, sPhone, bPromos, strPersonalMessage, ref bsi, strDesc, Quantity, Amount, ref ii, subtotal, shippingtype, shippingamount, total, ref oi);
     return(oi.ToString());
 }
        /// <summary>
        /// Return short date time.
        /// </summary>
        /// <param name="ndate">Date</param>
        /// <returns>Formated date.</returns>

        public static string ShortTimeReturn(System.Nullable <DateTime> ndate)
        {
            string retStr = string.Empty;

            if (ndate != null)
            {
                retStr = DateTime.Parse(ndate.ToString()).ToShortDateString();
            }
            return(retStr);
        }
Esempio n. 8
0
        private void one_shown_priv(object sender, EventArgs e)
        {
            var context = new DataClasses2DataContext();

            // string cipherText = textBox2.Text.Trim();
            // string decryptedText = CryptorEngine.Decrypt(cipherText, true);
            System.Nullable <long> totalUnitsOnOrder = (from ord in context.PTcos
                                                        select ord.Pret).Sum();
            label2.Text = totalUnitsOnOrder.ToString() + "lei";
        }
Esempio n. 9
0
 public static String CreateStringFromNullableDateTime(System.Nullable <DateTime> dateTime)
 {
     if (dateTime == null)
     {
         return("");
     }
     else
     {
         return(dateTime.ToString());
     }
 }
Esempio n. 10
0
        public static decimal DecimalValue <T>(this System.Nullable <T> source) where T : struct
        {
            decimal rVal = decimal.MinValue;

            if (source.HasValue)
            {
                decimal.TryParse(source.ToString(), out rVal);
            }

            return(rVal);
        }
Esempio n. 11
0
        public static int IntegerValue <T>(this System.Nullable <T> source) where T : struct
        {
            int rVal = int.MinValue;

            if (source.HasValue)
            {
                int.TryParse(source.ToString(), out rVal);
            }

            return(rVal);
        }
Esempio n. 12
0
 /// <summary>
 /// Sestaveni retezce pro podpis parametru platby (paymentIdentity)
 /// </summary>
 ///
 /// <param name="gopayId">identifikator prijemce prideleny GoPay</param>
 /// <param name="paymentSessionId">identifikator platby na GoPay</param>
 /// <param name="parentPaymentSessionId">id puvodni platby pri opakovane platbe</param>
 /// <param name="OrderNumber">identifikator platby u prijemce</param>
 /// <param name="secureKey">kryptovaci heslo pridelene prijemci, urcene k podepisovani komunikace</param>
 ///
 /// <returns>retezec pro podpis</returns>
 public static string ConcatPaymentIdentity(
     long gopayId,
     long paymentSessionId,
     System.Nullable <long> parentPaymentSessionId,
     string orderNumber,
     string secureKey)
 {
     return(gopayId.ToString() + "|" +
            paymentSessionId.ToString() + "|" +
            parentPaymentSessionId.ToString() + "|" +
            orderNumber + "|" +
            secureKey);
 }
Esempio n. 13
0
        private int generarmaximo()
        {
            try
            {
                System.Nullable <Int32> maxUnitsInStock =
                    (from prod in da.Promocion
                     select prod.IdPromocion).Max() + 1;

                return(Int32.Parse(maxUnitsInStock.ToString()));
            }
            catch (Exception ex) {
                return(1);
            }
        }
Esempio n. 14
0
        public static int AverageClassifRang(CSCDataClassesDataContext refContext, double ocjenaIntervalStart, double ocjenaIntervalEnd)
        {
            Table <Student> tblStudents = refContext.GetTable <Student>();

            var queryAvg =
                from stud in tblStudents
                where stud.ProsjecnaOcjena > ocjenaIntervalStart && stud.ProsjecnaOcjena < ocjenaIntervalEnd
                select stud.RangpriUpisu;

            System.Nullable <double> aveg = queryAvg.Average();

//      Console.WriteLine("Average = {0}", aveg);

            return(Convert.ToInt32(aveg.ToString()));
        }
Esempio n. 15
0
        private int generarmaximo()
        {
            try
            {
                System.Nullable <Int32> maxUnitsInStock =
                    (from prod in da.ClienteDefactura
                     select prod.IdNumeroCliente).Max() + 1;

                return(Int32.Parse(maxUnitsInStock.ToString()));
            }
            catch (Exception ex)
            {
                return(1);
            }
        }
Esempio n. 16
0
 private Int32 CheckUniqueControlType(int _modulecontriolid, int _moduledefid, int _controlType, int _portalId, bool _isEdit)
 {
     db.sp_CheckUnquieModuleControlsControlType(_modulecontriolid, _moduledefid, _controlType, _portalId, _isEdit, ref _controlCount);
     return(Int32.Parse(_controlCount.ToString()));
 }