/// <summary> /// Method to Generate AFC /// </summary> /// <param name="argEn">AFC Entity is an Input</param> /// <param name="RecStatus">RecStatus is an Input</param> /// <param name="batch">Batch is an Input</param> /// <returns>Returns BatchCode</returns> public string AFCNEW(AFCEn argEn, string RecStatus, string batch) { //Transaction Scope added by Solomon string NewAFC = string.Empty; //using (TransactionScope ts = new TransactionScope()) //{ try { AFCDAL loDs = new AFCDAL(); loDs.BatchDelete(argEn, "Check"); NewAFC = loDs.AFCNEW(argEn, RecStatus, batch); //ts.Complete(); //if (Transaction.Current.TransactionInformation.Status == TransactionStatus.Committed) //{ return(NewAFC); //} //else //{ // ts.Dispose(); // throw new TransactionException("Transaction is lost Record is not saved"); //} } catch (Exception ex) { //ts.Dispose(); throw ex; } //} }
/// <summary> /// Method to Edit AFC /// </summary> /// <param name="argEn">AFC Entity is an Input</param> /// <param name="RecStatus">RecStatus is an Input</param> /// <param name="batch">Batch is an Input</param> /// <returns>Returns BatchCode</returns> public string AFCEdit(AFCEn argEn, string RecStatus, string batch) { try { AFCDAL loDs = new AFCDAL(); return(loDs.AFCNEW(argEn, RecStatus, batch)); } catch (Exception ex) { throw ex; } }