本文整理汇总了C#中DAL.clsDataLayer类的典型用法代码示例。如果您正苦于以下问题:C# clsDataLayer类的具体用法?C# clsDataLayer怎么用?C# clsDataLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
clsDataLayer类属于DAL命名空间,在下文中一共展示了clsDataLayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: fnCheckAgent
public bool fnCheckAgent()
{
try
{
dsUserInfo = new DataSet();
SqlParameter spUserID = new SqlParameter();
spUserID.ParameterName = "@Result";
spUserID.SqlDbType = SqlDbType.VarChar;
spUserID.Size = 20;
spUserID.Direction = ParameterDirection.Output;
_objDataLayer = new clsDataLayer();
dsUserInfo = _objDataLayer.fnExecuteDataset("spCheckAgent", new SqlParameter("@EmailID", this.strEmailID),
new SqlParameter("@Password", this.strPassword), spUserID);
if (spUserID.Value.ToString() == "VALID USER")
{
if (dsUserInfo.Tables[0].Rows.Count > 0)
{
HttpContext.Current.Session["RechargeUserID"] = dsUserInfo.Tables[0].Rows[0]["UserID"].ToString();
HttpContext.Current.Session["RechargeUserType"] = dsUserInfo.Tables[0].Rows[0]["UserType"].ToString();
HttpContext.Current.Session["RechargeEmailID"] = dsUserInfo.Tables[0].Rows[0]["EmailID"].ToString();
//HttpContext.Current.Session["TravelTotalComm"] = dsUserInfo.Tables[1].Rows[0]["TotalComm"].ToString();
//HttpContext.Current.Session["TravelCancelComm"] = dsUserInfo.Tables[1].Rows[0]["CancelTtlComm"].ToString();
HttpContext.Current.Session["Status"] = dsUserInfo.Tables[0].Rows[0]["Status"].ToString();
//if (dsUserInfo.Tables[1].Rows.Count > 0)
//{
// HttpContext.Current.Session["APRBusCom"] = dsUserInfo.Tables[1].Rows[0][3].ToString();
//}
return true;
}
else
{
return false;
}
}
else if (spUserID.Value.ToString() == "INVALID USER")
{
return false;
}
else
{
return false;
}
}
catch (Exception ex)
{
//Logger.Log(Logger.LogType.Log_In_DB, ex, true);
return false;
}
finally
{
_objDataLayer = null;
dsUserInfo.Dispose();
}
}
示例2: GetDomAirportCodes
public DataSet GetDomAirportCodes()
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[1];
p[0] = new SqlParameter("@tableName", "DomAirportCodes");
return ObjDAL.fnExecuteDataSet("Sp_IFReports", p);
}
catch (Exception ex)
{
throw ex;
}
}
示例3: fnForgotPwd
public bool fnForgotPwd()
{
try
{
_objDataLayer = new clsDataLayer();
string strQuery = "UPDATE dbo.tbUsers SET Password='" + this.strPassword + "' WHERE UserID=" + this.RefID.ToString();
_objDataLayer.fnExecuteQuery(strQuery);
return true;
}
catch (Exception ex)
{
//Logger.Log(Logger.LogType.Log_In_DB, ex, true);
return false;
}
finally
{
_objDataLayer = null;
}
}
示例4: GetOpeartorByMobileSeries
public DataSet GetOpeartorByMobileSeries(string Prefix)
{
try
{
_objDataLayer = new clsDataLayer();
return _objDataLayer.fnExecuteDataset("Sp_MobileNoSeries",new SqlParameter("@Prefix",Prefix));
}
catch (Exception ex)
{
throw ex;
}
}
示例5: GetCitiesTours
public DataSet GetCitiesTours(string Consumerkey, string Consumersecretkey,int value)
{
try
{
_objDataLayer = new clsDataLayer();
SqlParameter[] p = new SqlParameter[3];
p[0] = new SqlParameter("@ConsumerKey", Consumerkey);
p[1] = new SqlParameter("@ConsumerSecret", Consumersecretkey);
p[2] = new SqlParameter("@Query", value);
return _objDataLayer.fnExecuteDataset("SP_WebAPI_GetCities", p);
}
catch (Exception ex)
{
throw ex;
}
}
示例6: fnUpdateRecord
public bool fnUpdateRecord()
{
try
{
_objDataLayer = new clsDataLayer();
switch (this.ScreenInd)
{
case Masters.Getservices:
_objDataLayer.fnExecuteStoredProcedure("sp_Temporaryservices", new SqlParameter("@TableName", "UpdateServices"),
new SqlParameter("@Id", this.ID),
new SqlParameter("@Status", this.Status));
break;
case Masters.AddAmounttoUsersRechargeFailed:
_objDataLayer.fnExecuteStoredProcedure("AddAmounttoUsersRechargeFailed", new SqlParameter("@UserID", this.UserID),
new SqlParameter("@Amount", this.amountewallet));
break;
case Masters.AgentCommission:
_objDataLayer.fnExecuteStoredProcedure("sp_AgentCommission", new SqlParameter("@TableName", "UpdateCommission"),
new SqlParameter("@ID", this.RefID),
new SqlParameter("@NetworkName", this.NetworkName),
new SqlParameter("@OperatorType", this.OperatorType),
new SqlParameter("@AgentCommission", this.AgentCommission));
break;
case Masters.ListOfAmounts:
_objDataLayer.fnExecuteStoredProcedure("sp_ListOfAmounts", new SqlParameter("@TableName", "UpdateListOfAmount"),
new SqlParameter("@ID", this.RefID),
new SqlParameter("@NetworkName", this.NetworkName),
new SqlParameter("@OperatorType", this.OperatorType),
new SqlParameter("@RechargeAmount", this.A_Amount),
new SqlParameter("@TalkTime", this.TalkTime));
break;
case Masters.deductadminbalance:
_objDataLayer.fnExecuteStoredProcedure("spdeductadminbalance", new SqlParameter("@Balance", this.A_Amount))
;
break;
case Masters.UpdateAdminonlyBalance:
_objDataLayer.fnExecuteStoredProcedure("sp_UpdateonlyAdminBalance", new SqlParameter("@Amount", this.A_Amount),
new SqlParameter("@ID", this.ID),
new SqlParameter("@UserID", this.UserID));
break;
case Masters.UpdateGuestrecharge3:
_objDataLayer.fnExecuteStoredProcedure("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
new SqlParameter("@TransactionID", this.TransactionID),
new SqlParameter("@Status", this.Status),
new SqlParameter("@Type", "DataCard"),
new SqlParameter("@ip", this.IP),
new SqlParameter("@A_Amount", this.A_Amount),
new SqlParameter("@parameter", this.Parameter))
;
break;
case Masters.getGuestrecharge1:
_objDataLayer.fnExecuteStoredProcedure("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
new SqlParameter("@TransactionID", this.TransactionID),
new SqlParameter("@Status",this.Status),
new SqlParameter("@Type", "Mobile"),
new SqlParameter("@ip", this.IP),
new SqlParameter("@A_Amount", this.A_Amount),
new SqlParameter("@parameter", this.Parameter))
;
break;
case Masters.getagentrecharge2:
_objDataLayer.fnExecuteStoredProcedure("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
new SqlParameter("@UserID", this.UserID),
new SqlParameter("@Status", this.Status),
new SqlParameter("@Amount", this.Amount),
new SqlParameter("@TransactionID", this.TransactionID),
new SqlParameter("@Commission",this.AgentCommission),
new SqlParameter("@Type", "DTH"),
new SqlParameter("@ip", this.IP),
new SqlParameter("@A_Amount",this.A_Amount),
new SqlParameter("@parameter", this.Parameter))
;
break;
case Masters.deductagentbalance:
_objDataLayer.fnExecuteStoredProcedure("spdeductagentbalance", new SqlParameter("@UserID", this.UserID),
new SqlParameter("@Balance", this.A_Amount),
new SqlParameter("@DisComm",this.Amount)
)
;
break;
case Masters.UPAgentprofile:
_objDataLayer.fnExecuteStoredProcedure("sp_Updateprofile", new SqlParameter("@TableName", "AgentProfile"),
new SqlParameter("@UserID", this.UserID),
//.........这里部分代码省略.........
示例7: fnInactive
public bool fnInactive()
{
try
{
_objDataLayer = new clsDataLayer();
switch (this.ScreenInd)
{
case Masters.UserMst:
_objDataLayer.fnExecuteStoredProcedure("spInactiveMstData", new SqlParameter("@TableName", "tbUser"),
new SqlParameter("@RefID", this.RefID));
break;
}
return true;
}
catch (Exception ex)
{
// Logger.Log(Logger.LogType.Log_In_DB, ex, true);
return false;
}
}
示例8: GetAgentFlights
public DataSet GetAgentFlights(FlightBAL objFlightBAL)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@TableName", objFlightBAL.FlightName);
p[1] = new SqlParameter("@userid", objFlightBAL.CreatedBy);
return ObjDAL.fnExecuteDataset("SP_GetAgentReport", p);
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
示例9: UpdateInternationalFlightBookingStatus
public bool UpdateInternationalFlightBookingStatus(FlightBAL objFlightBAL)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[9];
p[0] = new SqlParameter("@tableName", "UpdateBookingStatus");
p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
p[2] = new SqlParameter("@Status", objFlightBAL.Status);
p[3] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
p[4] = new SqlParameter("@AirlinePNR", objFlightBAL.AirlinePNR);
p[5] = new SqlParameter("@GDFPNRNo", objFlightBAL.GDFPNRNo);
p[6] = new SqlParameter("@eticketNo", objFlightBAL.eticketNo);
p[7] = new SqlParameter("@Flightuid", objFlightBAL.Flightuid);
p[8] = new SqlParameter("@passuid", objFlightBAL.passuid);
return ObjDAL.fnExecuteStoredProcedure("sp_InternationalFlightBooking", p);
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
示例10: UpdateDomesticFlightCancelStatus
public bool UpdateDomesticFlightCancelStatus(FlightBAL objFlightBAL)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[9];
p[0] = new SqlParameter("@tableName", "UpdateCancelStatus");
p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
p[2] = new SqlParameter("@Status", objFlightBAL.Status);
p[3] = new SqlParameter("@CancellationProcessDateTime", objFlightBAL.CancellationProcessDateTime);
p[4] = new SqlParameter("@CancellationCharges", objFlightBAL.CancellationCharges);
p[5] = new SqlParameter("@RefundStatus", objFlightBAL.RefundStatus);
p[6] = new SqlParameter("@FinalRefundAmount", objFlightBAL.FinalRefundAmount);
p[7] = new SqlParameter("@RefundDateTime", objFlightBAL.RefundDateTime);
p[8] = new SqlParameter("@ModifiedBy", objFlightBAL.CreatedBy);
return ObjDAL.fnExecuteStoredProcedure("sp_DomesticFlightCancel", p);
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
示例11: UpdateDomesticFlightBooking
public DataSet UpdateDomesticFlightBooking(FlightBAL objFlightBAL)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[4];
p[0] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
p[2] = new SqlParameter("@Status", objFlightBAL.Status);
p[3] = new SqlParameter("@tableName", "UpdateDomFlightBooking");
return ObjDAL.fnExecuteDataset("sp_DomesticFlightBooking", p);
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
示例12: GetTransID
public DataSet GetTransID(string RefNo)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@tableName", "GetTransIdByRefNo");
p[1] = new SqlParameter("@ReferenceNo", RefNo);
return ObjDAL.fnExecuteDataSet("sp_DomesticFlightBooking", p);
}
catch (Exception ex)
{
throw ex;
}
}
示例13: GetInternationalFlightDetailsI1
public DataSet GetInternationalFlightDetailsI1(string RefNo)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@tableName", "GetFlights");
p[1] = new SqlParameter("@FlightBookingID", RefNo);
return ObjDAL.fnExecuteDataSet("sp_DomesticFlightBookingsegments", p);
}
catch (Exception ex)
{
throw ex;
}
}
示例14: GetGuestReports
//Get Airport Codes from Database
public DataSet GetGuestReports(FlightBAL objFlightBAL)
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[4];
p[0] = new SqlParameter("@DateOfJourney", objFlightBAL.DateOfJourney);
p[1] = new SqlParameter("@RefNo", objFlightBAL.RefNo);
p[2] = new SqlParameter("@TableName", objFlightBAL.TableName);
p[3] = new SqlParameter("@DateOfIssue", objFlightBAL.DateOfIssue);
return ObjDAL.fnExecuteDataset("sp_AllGuestReports", p);
}
catch (Exception ex)
{
throw ex;
}
}
示例15: GetFlightSalesReport
public DataSet GetFlightSalesReport()
{
try
{
ObjDAL = new clsDataLayer();
SqlParameter[] p = new SqlParameter[4];
p[0] = new SqlParameter("@Flag", "FlightSalesReport");
p[1] = new SqlParameter("@FromDate", FromDate);
p[2] = new SqlParameter("@ToDate", ToDate);
p[3] = new SqlParameter("@agentId", agentId);
ObjDataset = (DataSet)ObjDAL.fnExecuteDataSet("sp_FlightsSalesReport", p);
return ObjDataset;
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}