Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 数据库表在运行程序后被锁定_C#_Asp.net Mvc_Oracle_Transactions_Ora 00054 - Fatal编程技术网

C# 数据库表在运行程序后被锁定

C# 数据库表在运行程序后被锁定,c#,asp.net-mvc,oracle,transactions,ora-00054,C#,Asp.net Mvc,Oracle,Transactions,Ora 00054,我需要在TBL\u LOAN\u DETAILS表中插入数据。调用LoanDetails()方法时,需要将这些数据插入表中的TBL\u LOAN\u DETAILSID中的数据是自动递增的。将数据插入TBL\u LOAN\u DETAILS后,我需要将该记录ID作为参数传递给CribProcess()中的另一个方法。在这里,经过一些计算/逻辑之后,我需要更新TBL\u LOAN\u DETAILS的某些列。为了实现这一点,我使用了以下代码。(我无法在这里粘贴完整的代码,因为stackoverfl

我需要在
TBL\u LOAN\u DETAILS
表中插入数据。调用
LoanDetails()
方法时,需要将这些数据插入表中的
TBL\u LOAN\u DETAILS
ID
中的数据是自动递增的。将数据插入
TBL\u LOAN\u DETAILS
后,我需要将该记录
ID
作为参数传递给
CribProcess()
中的另一个方法。在这里,经过一些计算/逻辑之后,我需要更新
TBL\u LOAN\u DETAILS
的某些列。为了实现这一点,我使用了以下代码。(我无法在这里粘贴完整的代码,因为stackoverflow阻止了它,所以我使用了pastebin)。我在这行
lAEntities.TBL\u LOAN\u DETAILS.Add(tblloandtails)上加了一个制动点程序未在此行之后运行。
lAEntities.SaveChanges()

我的部分代码:请使用链接检查我的完整代码

public LoanDetailEntityResponse LoanDetails(string custId, string facilityType, string applyedDate, string currency,string RequiredLoanAmount,string RepaymentPeriod,
                                            string NIC,string CustName,string DateofBirth, string CommunicationAddress,string MobileNumber,string LoanPurpose,string Occupation,string NetIncome,string Expenses,string Education_qualification,
                                            string TypeOfEmployment,string GE_Emp_Category,string Emp_Period,string GE_Position,string PE_Existence, string PE_Position,string SE_Experience,string SE_Business_Nature, string ValueOfAssets,
                                            string SE_Bus_RegNoo_Availability, string SE_Maintain_Financial_Recode, List<LandPropertyAsset> AssetLandList, List<VehicleAsset> AssetVehicleList)
{

    var refNo = string.Empty;
    var response = new LoanDetailEntityResponse();

        var lAEntities = new LAEntities();
        DateTime appDate;
        DateTime DOB;
        using (var transaction = lAEntities.Database.BeginTransaction())
        {
                if (DateTime.TryParse(applyedDate, out appDate))
                 {
                    applyedDate = appDate.ToShortDateString();
                    if (DateTime.TryParse(DateofBirth, out DOB))
                    {
                        DateofBirth = DOB.ToShortDateString();

                         refNo = Common.GetSerialSequence("LOANREFERENCENO", transaction);

                        string approvalStatus = "";
                        int approvalId = 1;
                        decimal loanId = 0;

                        var tBlLoanDetails = new TBL_LOAN_DETAILS
                        {
                            CUSTID = custId,
                            REFNO = refNo,
                            FACILITY_TYPE = facilityType,
                            APPLIED_DATE = applyedDate,
                            CURRENCY = currency,
                            REQLOANAMOUNT = Convert.ToDecimal(RequiredLoanAmount),
                            REPAYMENTPERIOD = RepaymentPeriod,
                            NIC = NIC,
                            CUSTNAME = CustName,
                            DATEOFBIRTH = DateofBirth,
                            COMMUNICATIONADDRESS = CommunicationAddress,
                            MOBILENUMBER = MobileNumber,
                            PURPOSEOFLOAN = LoanPurpose,
                            OCCUPATION = Occupation,
                            NETINCOME = Convert.ToDecimal(NetIncome),
                            EXPENSES = Convert.ToDecimal(Expenses),
                            EDUCATION_QUALIFICATION = Education_qualification,
                            TYPEOFEMPLOYMENT = TypeOfEmployment,
                            GE_EMP_CATEGORY = Convert.ToInt32(GE_Emp_Category),
                            EMP_PERIOD = Convert.ToInt32(Emp_Period),
                            GE_POSITION = Convert.ToInt32(GE_Position),
                            PE_EXISTENCE = Convert.ToInt32(PE_Existence),
                            PE_POSITION = Convert.ToInt32(PE_Position),
                            SE_EXPERIENCE = Convert.ToInt32(SE_Experience),
                            SE_BUS_NATURE = Convert.ToInt32(SE_Business_Nature),
                            SE_BUS_REGNNO_AVAILABILITY = SE_Bus_RegNoo_Availability,
                            SE_MAINTAAIN_FINANTIAL_RECORD = SE_Maintain_Financial_Recode,
                            EMP_VALUEOFASSETS = Convert.ToInt32(ValueOfAssets),
                            LOAN_STATUS_ID = approvalId,
                            REPAYMENTSCORE = 0,
                            PROPOSED_LOAN_FACI_INSTA = 0,
                            EXSISTING_LOAN_FACI_INSTA = 0,
                            ODINTEREST = 0,
                            CREDITCARD = 0,
                            SURPLUS = 0,
                            LOAN_STATUS_DES = "",
                            ISACTIVE = 1,
                            CREATEDBY = "System",
                            CREATEDDATETIME = DateTime.Now,
                            MODIFIEDBY = "System",
                            MODIFIEDDATETIME = DateTime.Now
                        };
                        lAEntities.TBL_LOAN_DETAILS.Add(tBlLoanDetails);
                        lAEntities.SaveChanges();
                        //transaction.Commit();                         

                        var loanDetail = lAEntities.TBL_LOAN_DETAILS.FirstOrDefault(x => x.REFNO.Equals(refNo) && x.ISACTIVE == 1);
                        if (loanDetail != null)
                        {
                            loanId = loanDetail.ID;


                            // Call Crib process
                            AppSettingsReader configReader = new AppSettingsReader();
                            var chromeDriverUrl = (string)configReader.GetValue("ChromeDriverUrl", typeof(string));
                            var navigateUrl = (string)configReader.GetValue("CRIBNavigateUrl", typeof(string));
                            var userName = "";
                            var password = "";
                            CribAutoProcess ca = new CribAutoProcess();
                            int facilityID = int.Parse(loanId.ToString());
                            ca.CribProcess(navigateUrl, userName, password, facilityID, CustName, NIC, "Testing");

                        }
                        }
                }
        }
}
public LoanDetailEntityResponse LoanDetails(字符串custId、字符串facilityType、字符串applyedDate、字符串currency、字符串required loanamount、字符串还款期、,
字符串NIC、字符串CustName、字符串出生日期、字符串通信地址、字符串移动枚举器、字符串LoanPurpose、字符串职业、字符串网络收入、字符串费用、字符串教育资格、,
字符串就业类型、字符串就业类别、字符串就业期间、字符串就业岗位、字符串就业岗位、字符串就业岗位、字符串就业岗位、字符串就业经历、字符串就业业务性质、字符串资产价值、,
字符串SE_总线\注册表\可用性、字符串SE_维护\财务\记录、列表资产列表、列表资产车辆列表)
{
var refNo=string.Empty;
var响应=新的LoandDetailEntityResponse();
var lAEntities=新的lAEntities();
日期时间appDate;
日期时间DOB;
使用(var transaction=lAEntities.Database.BeginTransaction())
{
if(DateTime.TryParse(applyedDate,out appDate))
{
applyedDate=appDate.ToShortDateString();
if(DateTime.TryParse(出生日期,出生日期))
{
DateofBirth=DOB.ToSortDateString();
refNo=Common.GetSerialSequence(“LOANREFERENCENO”,事务);
字符串approvalStatus=“”;
int-approvalId=1;
十进制loanId=0;
var TBLLONDETAILS=新的TBL\U贷款详细信息
{
CUSTID=CUSTID,
参考号=参考号,
设施类型=设施类型,
应用日期=应用日期,
货币=货币,
REQLOANAMOUNT=转换为特定值(RequiredLoanAmount),
还款期=还款期,
NIC=NIC,
CUSTNAME=CUSTNAME,
DATEOFBIRTH=出生日期,
通讯地址=通讯地址,
MOBILENUMBER=MOBILENUMBER,
目的地=目的地,
职业,
NETINCOME=Convert.ToDecimal(NETINCOME),
费用=转换为具体费用,
教育资格=教育资格,
就业类型=就业类型,
GE_EMP_类别=转换为32(GE_EMP_类别),
EMP_周期=转换为32(EMP_周期),
GE_位置=转换为32(GE_位置),
PE_存在=转换为32(PE_存在),
PE_位置=转换为32(PE_位置),
SE_经验=转换为32(SE_经验),
SE_总线性质=转换为32(SE_业务性质),
SE_BUS_REGNNO_AVAILABILITY=SE_BUS_REGNNO_AVAILABILITY,
维护财务记录=维护财务记录,
EMP_资产价值=转换为32(资产价值),
贷款状态ID=ApprovalValid,
还款得分=0,
提议的贷款和贷款额=0,
现有贷款和设施=0,
Ointerest=0,
信用卡=0,
盈余=0,
贷款_状态_DES=“”,
ISACTIVE=1,
CREATEDBY=“系统”,
CREATEDDATETIME=DateTime。现在,
MODIFIEDBY=“系统”,
MODIFIEDDATETIME=DateTime.Now
};
lAEntities.TBL_LOAN_DETAILS.Add(TBLLoandDetails);
lAEntities.SaveChanges();
//Commit();
var loanDetail=lAEntities.TBL_LOAN_DETAILS.FirstOrDefault(x=>x.REFNO.Equals(REFNO)&&x.ISACTIVE==1);
if(loanDetail!=null)
{
loanId=loanDetail.ID;
//呼叫婴儿床过程
AppSettingsReader configReader=新的AppSettingsReader();
var chromeDriverUrl=(string)configReader.GetValue(“chromeDriverUrl”,typeof(string));
var navigateUrl=(字符串)configReader.GetValue(“CRI