Exemplo n.º 1
0
 public static Boolean FundamentalAllReadingValidation(SqlParameter[] validation)
 {
     Boolean flag = false;
        using (var context = new SycousCon())
        {
        try
        {
            context.ExecuteStoreCommand("exec  SYCOUS.FundamentalAllReadingValidationAction @FundamentalValidationID,@modifyBy,@msg out,@Status out ", validation);
            String result = (String)validation[2].Value;
            if (result == "1")
            { flag = true; }
        }
        catch (Exception ex)
        {
            context.Dispose();
            throw;
        }
        }// using
        return flag;
 }
Exemplo n.º 2
0
 public static bool DailyConsumptionRejected(SqlParameter[] Estimated)
 {
     Boolean flag = false;
     using (var context = new SycousCon())
     {
         try
         {
             context.ExecuteStoreCommand("exec  sycous.EstimatedBillingReject  @ID,@modifyBy,@msg out ", Estimated);
             String result = (String)Estimated[2].Value;
             if (result == "1")
             { flag = true; }
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }// using
     return flag;
 }
Exemplo n.º 3
0
 public static bool DirectDebitWorkFlowAction(SqlParameter[] debit)
 {
     Boolean flag = false;
      using (var context = new SycousCon())
      {
          try
          {
      context.ExecuteStoreCommand("exec  SYCOUS.DirectDebitWorkFlowAction @DirectDebitID,@DueDate,@JobDate,@ClaimDate,@BillNo, @Amount, @Status,  @CreatedBy,@msg out ", debit);
              String result = (String)debit[8].Value;
              if (result == "1")
              { flag = true; }
          }
          catch (Exception ex)
          {
              context.Dispose();
              throw;
          }
      }// using
      return flag;
 }
Exemplo n.º 4
0
 public static Boolean CreateMeter(SqlParameter[] meter )
 {
     Boolean flag = false;
     using (var context = new SycousCon())
      {
                 try
                 {
                     context.ExecuteStoreCommand("exec  SYCOUS.CreateMeter @PropertyID,@SupplierID,@DeviceID,@FrequencyID,@MeterSerial,@Category ,@Warrenty,@BillingOffset,@MeterStartDate,@MeterEndDate,@OpeningReading,@OperationInput,@StartDate,@EndDate,@IsHighFrequency,@FrequencyInterval,@CreateBy,@Offset,@msg out ,@ReturnID out", meter);
                     String result = (String)meter[18].Value;
                     String ReturnID = (String)meter[19].Value;
                     if (result == "1")
                     { flag = true; }
                 }
                 catch (Exception ex)
                 {
                     context.Dispose();
                     throw;
                 }
     }// using
     return flag;
 }
Exemplo n.º 5
0
 public static Boolean SaveUnAssignBulkMeterInProperty(XmlDocument xDocBulkMeter)
 {
     Boolean flag = false;
         using (var context = new SycousCon())
         {
             try
             {
                 context.CommandTimeout = 680;
                 var @params = new[]{
                 new SqlParameter("RowInfoDataHeader", SqlDbType.NVarChar,-1){Value =xDocBulkMeter.InnerXml, Direction= ParameterDirection.Input} };
                 context.ExecuteStoreCommand("exec  [SYCOUS].[CreateBulkMeterInProperty] @RowInfoDataHeader", @params);
                 context.SaveChanges();
                 context.Dispose();
                 flag = true;
             }
             catch (Exception ex)
             {
                 context.Dispose();
                 throw;
             }
         }//
     return flag;
 }
Exemplo n.º 6
0
        public static Boolean UpdateOwner(SqlParameter[] param)
        {
            Boolean bol = false;
               using (var context = new SycousCon())
               {

                   try
                   {

            context.ExecuteStoreCommand("exec [SYCOUS].[OwnerFieldUpdated] @ID,@Email,@Telephone,@AgentTelephone,@AgentEmail,@ModifyBy,@msg out ", param);
                       String result = (String)param[6].Value;
                       if (result == "1")
                       { bol = true; }

                   }
                   catch (Exception ex)
                   {
                       context.Dispose();
                       throw;
                   }

               }// using

               return bol;
        }
Exemplo n.º 7
0
        public static Boolean UpdateFudamentalDetailDaily(SqlParameter[] validation)
        {
            Boolean flag = false;
               using (var context = new SycousCon())
               {
               try
               {
                   context.ExecuteStoreCommand("exec  SYCOUS.FundamentalDailyValidationAction  @ID,@modifyBy", validation);
                   //String result = (String)validation[2].Value;
                   //// Status = (String)validation[2].Value;
                   //Status = String.Empty;
                   //if (result == "1")
                   //{
                       flag = true;

                  // }
               }
               catch (Exception ex)
               {
                   context.Dispose();
                   throw;
               }
               }// using
               return flag;
        }
Exemplo n.º 8
0
 public static Boolean CreateConsumerRegistration(SqlParameter[] consumer)
 {
     Boolean flag = false;
     using (var context = new SycousCon())
     {
         try
         {
             context.ExecuteStoreCommand("exec  SYCOUS.ConsumerRegistration @UserName,  @FirstName,@LastName,@Password,@HintQuestion,@HintAns ,@MembershipID,@UserType,@ConsumerID,@ConsumerType,@CreateBy,@msg out ", consumer);
             String result = (String)consumer[11].Value;
             if (result == "1")
             { flag = true; }
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }// using
     return flag;
 }
 public static Boolean PendingNotificationValidationRejected(SqlParameter[] pending)
 {
     Boolean flag = false;
     using (var context = new SycousCon())
     {
         try
         {
             context.ExecuteStoreCommand("exec  SYCOUS.FundamentalAllReadingValidationPendingReject  @FundamentalValidationID,@BillFromDate,@BillingUpTo,@BillingDate, @modifyBy,@msg out ", pending);
             String result = (String)pending[5].Value;
             if (result == "1")
             { flag = true; }
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }// using
     return flag;
 }
Exemplo n.º 10
0
 public static bool SaveGenerateEstimatedBillingProcess(SqlParameter[] Bill)
 {
     Boolean flag = false;
     using (var context = new SycousCon())
     {
         try
         {
             context.ExecuteStoreCommand("exec  sycous.GenerateEstimatedBillingProcess  @DeviceID,@ProcessingDate,@msg out ", Bill);
             String result = (String)Bill[2].Value;
             if (result == "1")
             { flag = true; }
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }// using
     return flag;
 }
Exemplo n.º 11
0
 public static Boolean RetrievePassword(SqlParameter[] password)
 {
     Boolean flag = false;
     using (var context = new SycousCon())
     {
         try
         {
             context.ExecuteStoreCommand("exec  SYCOUS.ForgotPassword @UserName,@msg out", password);
             String result = (String)password[1].Value;
             if (result == "1")
             { flag = true; }
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }// using
     return flag;
 }
Exemplo n.º 12
0
 public static void SendBillbyMail(SqlParameter[] Bill)
 {
     using (var context = new SycousCon())
     {
         try
         {
             context.ExecuteStoreCommand("exec  sycous.SendingBill  @BillNo", Bill);
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }// using
 }
Exemplo n.º 13
0
 public static bool UpdatePayment(SqlParameter[] payment)
 {
     Boolean flag = false;
        using (var context = new SycousCon())
        {
        try
        {
            context.ExecuteStoreCommand("exec  SYCOUS.CreatePaymnet @ConsumerType,@ConsumerID,@PaymentAmount,@paymentDate,@paymentMethod,@ChequeNo,@Deposite, @CreateBy,@msg out ", payment);
            String result = (String)payment[8].Value;
            if (result == "1")
            { flag = true; }
        }
        catch (Exception ex)
        {
            context.Dispose();
            throw;
        }
        }// using
        return flag;
 }
Exemplo n.º 14
0
        public static Boolean CreateSiteInDataLogger(String SiteID, String ClientID,String CreatedBy,XmlDocument xml)
        {
            bool flag = false;
            using (var context = new SycousCon())
            {
                try
                {

             var @params = new[]{
            new SqlParameter( "ClientID",SqlDbType.VarChar,50){ Value=ClientID, Direction=ParameterDirection.Input},
            new SqlParameter("SiteID", SqlDbType.VarChar,50){Value =SiteID, Direction= ParameterDirection.Input},
             new SqlParameter("CreatedBy", SqlDbType.VarChar,50){Value =CreatedBy, Direction= ParameterDirection.Input},
            new SqlParameter("RowInfo", SqlDbType.VarChar){Value =xml.InnerXml, Direction= ParameterDirection.Input}
                   };

                     context.ExecuteStoreCommand("exec  [SYCOUS].[CreateSiteInDataLoggers]  @ClientID , @SiteID , @CreatedBy,@RowInfo" , @params);
                     flag = true;
                }
                catch (Exception ex)
                {
                    throw;
                }
                return flag;
            }
        }
Exemplo n.º 15
0
 public static bool UpdateCreditControlWorkFlowAction(SqlParameter[] Credit)
 {
     Boolean flag = false;
        using (var context = new SycousCon())
        {
        try
        {
            context.ExecuteStoreCommand("exec  SYCOUS.CreditControlFlowAction @ID,@IsClosed,@IsEmail,@IsLetter,@EmailID,@modifyBy,@msg out ", Credit);
            String result = (String)Credit[6].Value;
            if (result == "1")
            { flag = true; }
        }
        catch (Exception ex)
        {
            context.Dispose();
            throw;
        }
        }// using
        return flag;
 }