コード例 #1
0
ファイル: InwardOutwardTest.cs プロジェクト: UrviGandhi/IGRSS
 public void AddInwardDetailsTest()
 {
     IGRSS.BusinessLogicLayer.InwardOutward target = new IGRSS.BusinessLogicLayer.InwardOutward();
     FormViewParameter Parameter = new FormViewParameter();
     IGRSS.DataAccessLayer.InwardOutward.Inward_OutwardRegisterDataTable dt = new IGRSS.DataAccessLayer.InwardOutward.Inward_OutwardRegisterDataTable();
     DataRow dr = dt.NewRow();
     dr["Inward_outwardId"] = new Guid();
     dr["RegisterType"] = "I";
     dr["DocumentNo"] = "2221";
     dr["InOutDate"] =DateTime.Now;
     dr["DocType"] = new Guid("f21071c4-076b-4040-bf45-412889457dae");
     dr["SentOfficeID"] = new Guid("916fd082-061a-45fb-91a4-33967243b4cf");
     dr["ReceivingOfficeID"] =new Guid("916fd082-061a-45fb-91a4-33967243b4cf");
     dr["DocumentSentFrom"] = "Chennai";
     dr["DocumentSentTo"] ="BANGALORE";
     dr["Description"] = "500";
     dr["StampValueAffixed"] = 20;
     dr["DeliveryType"] =new Guid("8d0413b8-75d9-4c46-9b0b-019b4dcb9253");
     dr["Remarks"] = "500";
     dr["CreatedBy"] ="RAJA";
     dt.Rows.Add(dr);
     Parameter.Values = dt.Rows[0];
     Assert.AreEqual(true,target.AddInwardDetails(Parameter), "IGRSS.BusinessLogicLayer.InwardOutward.AddInwardDetails did not return the expect" +
             "ed value.");
 }
コード例 #2
0
 protected void odsBranch_Updating(object sender, ObjectDataSourceMethodEventArgs e)
 {
     FormViewParameter Parameters = new FormViewParameter();
     Parameters.Values = (DataRow)e.InputParameters["Values"];
     e.InputParameters["Parameter"] = Parameters;
     e.InputParameters.Remove("Values");
 }
コード例 #3
0
 protected void odsOfficeCommunicationById_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
 {
     FormViewParameter Parameters = new FormViewParameter();
     Parameters.Values = (DataRow) e.InputParameters["Values"];
     e.InputParameters["Parameter"] = Parameters;
     e.InputParameters.Remove("Values");
 }
コード例 #4
0
 protected void OdsQualificationMaster_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
 {
     FormViewParameter Parameters = new FormViewParameter();
     Parameters.Values = (DataRow) e.InputParameters["Values"];
     e.InputParameters["Parameter"] = Parameters;
     e.InputParameters.Remove("Values");
 }
コード例 #5
0
 protected void odsInspectionCheckList_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
 {
     FormViewParameter Parameters = new FormViewParameter();
     Parameters.Values = (DataRow) e.InputParameters["Values"];
     e.InputParameters["Parameter"] = Parameters;
     e.InputParameters.Remove("Values");
 }
コード例 #6
0
        public bool UpdateValuationForm(FormViewParameter ValFormParameter, DataTable DocDetails)
        {
            try
            {
                string curUser = Thread.CurrentPrincipal.Identity.Name;
                ValuationFormRow ValFormrow = (IGRSS.DataAccessLayer.Adjudication.ValuationFormRow)ValFormParameter.Values;
                Guid ValuationFormId = ValFormrow.OfficeId;

                IgrssAdapters.ValuationAdapter.UpdateValuationFormByValFormId(
                            ValFormrow.Village_CityName, ValFormrow.TPSchemeNo, ValFormrow.TPSchemeName, ValFormrow.FinalPlotNo, ValFormrow.CitySurveyNo,
                            ValFormrow.RevenueSurveyNo, ValFormrow.Ward_SubWardNo, ValFormrow.NameOfOwner, ValFormrow.AddressOfOwner,
                            ValFormrow.NameOfClaimingParty, ValFormrow.AddressOfClaimingParty, ValFormrow.AreaOfPlot, ValFormrow.AreaOfConstruction,
                            ValFormrow.YearOfConstruction, ValFormrow.NoOfFloors, ValFormrow.TypeOfProperty, ValFormrow.HeightOfCeiling,
                            ValFormrow.TypeOfTiles, ValFormrow.WallFurnishing, ValFormrow.NoOfBathrooms, ValFormrow.BathroomTilesHeight,
                            ValFormrow.NoOfToilets, ValFormrow.ToiletTilesHeight, ValFormrow.Parking, ValFormrow.DescOfProperty,
                            ValFormrow.ShopsOnGroundFloor, ValFormrow.IsPropertyInCommercial, ValFormrow.TypeOfElectricfication, ValFormrow.CompoundWallType,
                            ValFormrow.IsLightsOnCompoundWall, ValFormrow.WaterStorageFacility, ValFormrow.DrainageSystem, ValFormrow.NoOfLifts,
                            ValFormrow.AreaOfEachLift, ValFormrow.InternalRoad, ValFormrow.ValuatedBefore, ValFormrow.ValuationFormId, curUser, DateTime.Now);

                // Delete and Insert all the documents that are attached to this ValuationForm
                IgrssAdapters.AdjudicationDocumentAdapter.DeleteDocumentDetailByValuationFormId(ValuationFormId);
                foreach (DataRow DocDetail in DocDetails.Rows)
                {
                    IgrssAdapters.AdjudicationDocumentAdapter.AddAdjudicationDocument(ValuationFormId, (Guid)DocDetail["DocumentTypeId"], Convert.ToBoolean(DocDetail["Submitted"]), Convert.ToString(DocDetail["DocumentNumber"]), Convert.ToString(DocDetail["Remarks"]));
                }

                return true;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
コード例 #7
0
ファイル: Registration.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddNewRegistration(FormViewParameter Parameter, DataTable PartyDetails, Guid Id, DataTable FeeDetails,DataTable DocDetails,Remarks rem)
        {
            IGRSS.DataAccessLayer.Registration.InputSheetRow row = (IGRSS.DataAccessLayer.Registration.InputSheetRow) Parameter.Values;
               Guid  ValuationFormId = Id;

            string curUser = Thread.CurrentPrincipal.Identity.Name;
            Guid RegistrationId = FileManager.OpenNewFile(row.OfficeId, "REG");
            FileManager.AddRemarkToFile(RegistrationId,rem.Subject,rem.Body);
            //ViewState["ValuationFormId"] = ValuationFormId;
            IgrssAdapters.InputSheet.AddNewInputSheet(RegistrationId, row.OfficeId, row.RegistrationTypeId,ValuationFormId, row.FilePrefix, row.FileSlNo, row.FileYear,
            row.ApplnDate, row.ApplicantName, row.ApplnAddress, row.PropertyValue, row.IsRented, row.LeasePeriodFrom, row.LeasePeriodTo,
            row.DepositAmount, row.Tax, row.YearlyRent, row.StampDutyUsed,  curUser, DateTime.Now);

            foreach (DataRow PartyDetail in PartyDetails.Rows)
            {
                IgrssAdapters.RegistrationPartyDetails.AddNewPartyDetails(Guid.NewGuid(), RegistrationId,

                (string) PartyDetail["PartyType"], (string) PartyDetail["Name"], (string) PartyDetail["Address"], (decimal) PartyDetail["Age"],
                (string) PartyDetail["Gender"], (Guid) PartyDetail["Religion"], (string) PartyDetail["Occupation"],
                (string) PartyDetail["Occupation"], curUser, DateTime.Now);

            }

            foreach (DataRow FeeDetail in FeeDetails.Rows)
            {
                IgrssAdapters.RegistrationFeeDetails.AddNewRegistrationFee(RegistrationId, (Guid) FeeDetail["FeeId"], Convert.ToDecimal(FeeDetail["Amount"]));
            }
            foreach (DataRow DocDetail in DocDetails.Rows)
            {

                IgrssAdapters.RegistrationDocumentCheckList.AddNewRegistrationDocuments(RegistrationId, (Guid) DocDetail["DocumentTypeId"], Convert.ToBoolean(DocDetail["Submitted"]), Convert.ToString(DocDetail["DocumentNumber"]), Convert.ToString(DocDetail["Remarks"]));
            }

             	return true;
        }
コード例 #8
0
ファイル: RefundActMaster.cs プロジェクト: UrviGandhi/IGRSS
 public bool AddNewActMaster(FormViewParameter Parameter)
 {
     string curUser = Thread.CurrentPrincipal.Identity.Name;
     Guid ActId=Guid.NewGuid();
     IGRSS.DataAccessLayer.ActMaster.ActMasterRow row = (IGRSS.DataAccessLayer.ActMaster.ActMasterRow) Parameter.Values;
     IgrssAdapters.ActMasterAdapter.AddNewActMaster(ActId, row.DescriptionOfAct, row.NameOfAct, curUser, DateTime.Now);
     return true;
 }
コード例 #9
0
ファイル: OfficeMaster.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddNewOffices(FormViewParameter Parameter)
        {
            //        Guid OfficeId = Guid.NewGuid();
            //        string curUser = Thread.CurrentPrincipal.Identity.Name;
            //        IGRSS.DataAccessLayer.OfficesMaster.OfficeMasterRow row = (IGRSS.DataAccessLayer.OfficesMaster.OfficeMasterRow) Parameter.Values;

            //        IgrssAdapters.OfficesAdapter.AddNewOffice(OfficeId, row.OfficeName, row.OfficeTypeId, row.Description, curUser, DateTime.Now);
            return true;
        }
コード例 #10
0
        public bool AddNewOfficeCommunication(FormViewParameter Parameter)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            IGRSS.DataAccessLayer.OfficesMaster.OfficesCommunication_LKPRow  row= (IGRSS.DataAccessLayer.OfficesMaster.OfficesCommunication_LKPRow)Parameter.Values;

            IgrssAdapters.OfficeCommunication_LKP.AddNewOfficeCommunication(row.OfficeId, row.CommunicationKey, row.CommunicatingOffice, row.Description, row.IsActive, curUser, DateTime.Now);

            return true;
        }
コード例 #11
0
ファイル: ManageUserRoles.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddNewUserInOfficeRoles(FormViewParameter Parameter,string UserName)
        {
            IGRSS.DataAccessLayer.WorkflowSupprot.UsersInOfficeRolesRow row = (IGRSS.DataAccessLayer.WorkflowSupprot.UsersInOfficeRolesRow) Parameter.Values;
            string curUser = Thread.CurrentPrincipal.Identity.Name;

            IgrssAdapters.UsersInOfficeRole.UpdateUserInOfficeRoles(UserName, row.DesignationID, row.OfficeId, row.Comments, row.IsActive, curUser, DateTime.Now);

            return true;
        }
コード例 #12
0
ファイル: VendorMaster.cs プロジェクト: UrviGandhi/IGRSS
 public void AddVendorDetails(FormViewParameter Parameter)
 {
     string curUser = Thread.CurrentPrincipal.Identity.Name;
     try
     {
         IGRSS.DataAccessLayer.VendorMaster.VendorMasterRow Row = (IGRSS.DataAccessLayer.VendorMaster.VendorMasterRow) Parameter.Values;
         VendorAdapter.AddNewVendorDetails(Guid.NewGuid(), Row.VendorType, Row.CompanyName, Row.VendorName, Row.Address, Row.Phone, Row.ContactPerson, curUser, DateTime.Now);
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "DAL"))
             throw;
     }
 }
コード例 #13
0
ファイル: Employee.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddNewEmployeeMaster(FormViewParameter Parameter, DataTable dtQualification)
        {
            IGRSS.DataAccessLayer.Employee.EmployeeMasterRow row = (IGRSS.DataAccessLayer.Employee.EmployeeMasterRow) Parameter.Values;
            DataTable dt = IgrssAdapters.EmployeeMaster.SelectEmployeeDetailsByEmpNo(row.EmployeeNo);
            if (dt.Rows.Count==0)
            {
                Guid EmployeeId = Guid.NewGuid();
                string curUser = Thread.CurrentPrincipal.Identity.Name;
                try
                {
                    IgrssAdapters.EmployeeMaster.InsertEmployeeMaster(EmployeeId,
                                row.EmployeeNo,
                                row.FirstName,
                                row.MiddleName,

                                row.PostalAddress,
                                row.PermanentAddress,
                                row.DateOfBirth,
                                row.FatherName,
                                row.Height,
                                row.VisibleMarks,
                                row.OfficeID,
                                row.DepartmentID,
                                row.DesignationID,
                                row.Salary,
                                row.Allowances,
                                row.StartDate,

                                curUser,
                                DateTime.Now);

                    foreach (DataRow drQualifications in dtQualification.Rows)
                    {

                        IgrssAdapters.EmployeeQualifications.InsertEmployeeQualification(Guid.NewGuid(), EmployeeId, (Guid) drQualifications["QualificationID"], (string) drQualifications["Details"], curUser, DateTime.Now);
                    }

                }

                catch (Exception ex)
                {
                    if (ExceptionPolicy.HandleException(ex, "DAL"))
                        throw;
                }
                return true;
            }
            else
                return false;
        }
コード例 #14
0
ファイル: Leave.cs プロジェクト: UrviGandhi/IGRSS
 public bool AddLeaveDetails(FormViewParameter Parameter)
 {
     string curUser = Thread.CurrentPrincipal.Identity.Name;
          try
          {
              IGRSS.DataAccessLayer.Leave.LeaveRegisterRow Row = (IGRSS.DataAccessLayer.Leave.LeaveRegisterRow) Parameter.Values;
              IgrssAdapters.LeaveAdapter.AddLeaveDetails(Guid.NewGuid(), Row.EmployeeID, Row.ApplnDate, Row.ApplicableRules, Row.LeaveType, Row.LeaveFrom, Row.LeaveTo, Row.WorkingDays, Row.Reason, Row.ResumedDutyOn, curUser, DateTime.Now);
          }
          catch (Exception ex)
          {
              if (ExceptionPolicy.HandleException(ex, "DAL"))
                  throw;
          }
          return true;
 }
コード例 #15
0
ファイル: VendorOffence.cs プロジェクト: UrviGandhi/IGRSS
        public void AddVendorOffence(FormViewParameter Parameter, Guid LicenseId)
        {
            try
            {
                IGRSS.DataAccessLayer.VendorOffence.VendorOffenceRow Row = (IGRSS.DataAccessLayer.VendorOffence.VendorOffenceRow)Parameter.Values;
                FileidId = FileManager.OpenNewFile(Row.OfficeId, "LIC");
                IgrssAdapters.VOffenceAdapter.AddNewVendorOffence(FileidId, Row.OfficeId, Row.Name, Row.Summary, Row.Details, Row.OffenceDate, LicenseId);

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
            }
        }
コード例 #16
0
ファイル: Complain.cs プロジェクト: UrviGandhi/IGRSS
        //string ComplaintNo, Guid ComplaintType, Guid AgainstEmpID, Guid ComplainingEmpID, string ComplainantName, string ComplainantAddress, DateTime ComplaintDate, Guid ReceivingOfficeId, string Subject, string Detail)
        /// <summary>
        /// This function will add the new Complain. 
        /// </summary>
        /// <returns>void</returns>
        public bool AddNewComplain(FormViewParameter Parameter, Remarks rem)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            int i = 0;
            ComplainDetailsRow row = (ComplainDetailsRow)Parameter.Values;
            try
            {
                Guid ComplainId = FileManager.OpenNewFile(row.ReceivingOfficeId, "COM");
                // Commented By Akhilesh.
                //if (rem.Subject != "" && rem.Body != "")
                //{
                //    FileManager.AddRemarkToFile(ComplainId, rem.Subject, rem.Body);
                //}
                int rowsAffected=0;
                if(row.ComplaintType == new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3"))
                {
                    i=IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, row.ReceivingOfficeId, row.Subject, row.Detail, curUser, DateTime.Now,row.Designation,row.CurrentOffice);
                }
                if (row.ComplaintType == new Guid("96369687-0450-42fc-ba41-ad35ade13b53"))
                {
                     i=IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, null, row.Subject, row.Detail, curUser, DateTime.Now, row.Designation, null);
                }
                if (i > 0)
                {
                    Dictionary<string, object> WfParams = new Dictionary<string, object>();
                    WfParams.Add("ComplainId", ComplainId);
                    WfParams.Add("ComplainOffice", row.ReceivingOfficeId);

                    WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(ComplainProcess), WfParams);

                    return true;
                }
                else
                {

                    return false;
                }
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
コード例 #17
0
ファイル: AppealApplication.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddAppealAplication(FormViewParameter parameter, DataTable dtAct,Remarks rem)
        {
            //Initiate some of the fields required for the process
            AppealApplicationRow rowApl = (AppealApplicationRow)parameter.Values;
            Guid AppealId = FileManager.OpenNewFile(rowApl.OfficeId, "APL");
            FileManager.AddRemarkToFile(AppealId, rem.Subject, rem.Body);
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            int i = 0;
            try
            {

                IGRSS.DataAccessLayer.Appeal.AppealApplicationRow row = (AppealApplicationRow) parameter.Values;
                i=IgrssAdapters.AppealAdapter.AddAppealApplication(AppealId, row.OfficeId, row.RegistrationNo, row.ApplicantName, row.Address, row.TypeOfAppeal, row.CalculatedAmount, row.DepositAmount, row.FeeReceiptNo, row.Amount, row.InwardDate, row.IsPaidAppealFee, row.AppealInTime, row.PaperFromTo, row.CourtFeeTicket, curUser, DateTime.Now, row.DocumentNo, row.OriginalSRO, row.DocumentDate, row.DaTeOffOrderFromCollector, row.DficitAmount,row.ReceiptNo,row.ReceiptDate);
                if (i > 0)
                {
                    foreach (DataRow dr in dtAct.Rows)
                    {
                        IgrssAdapters.AppealActAdapter.AddAppealAct(AppealId, (Guid)dr["ActId"], (bool)dr["Checked"]);
                    }

                    // All database Inserts have been completed sucessfully initiate the Workflow
                    // Create a Dioctionary to store Workflow Paramaters for Appeal
                    Dictionary<string, object> WfParams = new Dictionary<string, object>();
                    // Add Refund Application  Id into the Workflow Parameter
                    WfParams.Add("AppealId", AppealId);
                    // Add Office Id in to Workflow Parameter
                    // (to identify the process flow for the Office)
                    WfParams.Add("InitiatingOffice", row.OfficeId);

                    // Initiate the Refund Workflow by passing the Wf Parameters Dictionary
                    WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(AppealProcess), WfParams);
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
コード例 #18
0
ファイル: LeaveTest.cs プロジェクト: UrviGandhi/IGRSS
 public void AddLeaveDetailsTest()
 {
     IGRSS.BusinessLogicLayer.Leave target = new IGRSS.BusinessLogicLayer.Leave();
     FormViewParameter Parameter =new FormViewParameter(); // TODO: Initialize to an appropriate value
     IGRSS.DataAccessLayer.Leave.LeaveRegisterDataTable Dt = new IGRSS.DataAccessLayer.Leave.LeaveRegisterDataTable();
     DataRow dr = Dt.NewRow();
     dr["EmployeeID"] = new Guid("fc9b70d5-9344-4059-87f2-a9d082601c76");
     dr["LeaveType"] = new Guid("9ec9c473-dd5d-47af-885a-59a65a5bb651");
     dr["LeaveFrom"] = DateTime.Now;
     dr["LeaveTo"] = DateTime.Now;
     dr["Reason"] ="just not filing well";
     dr["ResumedDutyOn"] = DateTime.Now.AddDays(5);
     Parameter.Values = Dt.Rows[0];
     Dt.Rows.Add(dr);
     bool expected = true;
     Assert.AreEqual(expected, target.AddLeaveDetails(Parameter), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
             "");
 }
コード例 #19
0
 public void AddAppealAplicationTest()
 {
     IGRSS.BusinessLogicLayer.AppealApplication target = new IGRSS.BusinessLogicLayer.AppealApplication();
     FormViewParameter Parameter = new FormViewParameter();
     IGRSS.DataAccessLayer.Appeal.AppealApplicationDataTable dt = new IGRSS.DataAccessLayer.Appeal.AppealApplicationDataTable();
     DataRow dr = dt.NewRow();
     dr["AppealApplicationId"] = new Guid();
     dr["AppealPrefix"] = "YSL";
     dr["AppealSlNo"]="22210";
     dr["AppealYear"]=2006;
     dr["OfficeId"]=new Guid("514ba1d5-61fb-4b9d-abfd-0dff857ca05d");
     dr["RegistrationNo"]="324444";
     dr["ApplicantName"]="BASKAR";
     dr["Address"]="Chennai";
     dr["TypeOfAppeal"]=2;
     dr["CalculatedAmount"]=500;
     dr["DepositAmount"] = 200;
     dr["FeeReceiptNo"]="467";
     dr["Amount"]="500";
     dr["InwardDate"]=DateTime.Now;
     dr["IsPaidAppealFee"]=true;
     dr["AppealInTime"]=true;
     dr["PaperFromTo"]="ssss";
     dr["CourtFeeTicket"]=true;
     dr["AppealRemarks"]="short listed";
     dr["CreatedBy"] = "sahu";
     dr["DocumentNo"]="3333";
     dr["OriginalSRO"] = new Guid("916fd082-061a-45fb-91a4-33967243b4cf");
     dr["DocumentDate"] = DateTime.Now;
     dt.Rows.Add(dr);
     Parameter.Values = dt.Rows[0];
     DataTable dtAct = new DataTable();
     dtAct.Columns.Add("ActId", typeof(Guid));
     dtAct.Columns.Add("Checked", typeof(bool));
     DataRow actDR;
     actDR = dtAct.NewRow();
     actDR["ActId"] = new Guid("eee9b625-be85-4715-920b-3ed6ec0f4470");
     actDR["Checked"] = true;
     dtAct.Rows.Add(actDR);
     target.AddAppealAplication(Parameter, dtAct);
     bool expected = true;
     Assert.AreEqual(expected,target.AddAppealAplication(Parameter, dtAct), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
             "");
 }
コード例 #20
0
ファイル: VendorOffence.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddNewvendorInvestigationDetails(FormViewParameter Parameter,Guid OffenceId,string InvestigationType,string Remarks)
        {
            try
            {
                IGRSS.DataAccessLayer.VendorOffence.VendorInvestigationRow Row = (IGRSS.DataAccessLayer.VendorOffence.VendorInvestigationRow)Parameter.Values;

                int i=IgrssAdapters.VInspectionAdapter.AddNewvendorInvestigationDetails(OffenceId, Guid.NewGuid(),InvestigationType,Row.Date, Row.Participants, Row.Summary, Row.Details,Row.IsJudgement,Remarks);
                if (i == 1)
                    return true;
                else
                    return false;

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
コード例 #21
0
ファイル: Service.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddServiceDetails(FormViewParameter Parameter)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
                try
                {
                    IGRSS.DataAccessLayer.Service.ServiceRegisterRow Row = (IGRSS.DataAccessLayer.Service.ServiceRegisterRow) Parameter.Values;
                    int i=IgrssAdapters.ServiceAdapter.AddNewServiceDetails(Guid.NewGuid(), Row.ServiceNo, Row.VendorID, Row.ServiceDate, Row.InChargeEmpID, Row.InstrumentRepaired, Row.Remarks, curUser, DateTime.Now);
                    if (i == 1)
                        return true;
                    else
                        return false;

                }
                catch (Exception ex)
                {
                    if (ExceptionPolicy.HandleException(ex, "DAL"))
                        throw;
                    return false;
                }
        }
コード例 #22
0
ファイル: Copy of TestTable.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddTest(FormViewParameter Parameter)
        {
            //, Row.DeliveryBranch, Row.DocumentSender, Row.ReceiversName
            try
            {

                IGRSS.DataAccessLayer.TestTable.TestRow Row = (IGRSS.DataAccessLayer.TestTable.TestRow)Parameter.Values;
                int i = IgrssAdapters.TestTableAdapter.InsertQuery(1,"Urvi" );
                if (i == 1)
                    return true;
                else
                    return false;

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
コード例 #23
0
ファイル: InwardOutward.cs プロジェクト: UrviGandhi/IGRSS
        public bool AddOutWardDetails(FormViewParameter Parameter)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            try
            {
                
                IGRSS.DataAccessLayer.InwardOutward.Inward_OutwardRegisterRow Row = (IGRSS.DataAccessLayer.InwardOutward.Inward_OutwardRegisterRow)Parameter.Values;
                //int i = IgrssAdapters.InwardAdapter.AddOutwardDetails(Guid.NewGuid(), "", Row.DocumentNo, Row.InOutDate, Row.DocType, Row.SentOfficeID, Row.ReceivingOfficeID, Row.DocumentSentFrom, Row.DocumentSentTo, Row.Description, Row.StampValueAffixed, Row.DeliveryType, Row.Remarks, curUser, DateTime.Now, Row.DeliveryBranch, Row.DocumentSender, Row.ReceiversName);
                //if (i == 1)
                //    return true;
                //else
                return false;

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }


        }
コード例 #24
0
ファイル: EmployeeTest.cs プロジェクト: UrviGandhi/IGRSS
 public void AddNewEmployeeMasterTest()
 {
     IGRSS.BusinessLogicLayer.Employee target = new IGRSS.BusinessLogicLayer.Employee();
     FormViewParameter Parameter = new FormViewParameter();
     IGRSS.DataAccessLayer.Employee.EmployeeMasterDataTable dt = new  IGRSS.DataAccessLayer.Employee.EmployeeMasterDataTable();
     DataRow dr = dt.NewRow();
     dr["EmployeeId"] = new Guid();
     dr["EmployeeNo"] = "234";
     dr["FirstName"] = "PRADEEP";
     dr["MiddleName"] ="sahu";
     dr["LastName"] = "NITHYANAND";
     dr["PostalAddress"] = "SSSSSSSSSSS";
     dr["PermanentAddress"] = "FFFFFFFFF";
     dr["DateOfBirth"] = DateTime.Now;
     dr["FatherName"] = "BANGALORE";
     dr["Height"] = 12;
     dr["VisibleMarks"] = 5;
     dr["OfficeID"] = new Guid("916fd082-061a-45fb-91a4-33967243b4cf");
     dr["DepartmentID"] = new Guid("8971ce62-34a8-4175-9e1f-8d4bcc1721a1");
     dr["DesignationID"] = new Guid("7c83e591-a861-4b4f-bd1d-12f99cc32123");
     dr["Salary"] = 200;
     dr["Allowances"] = 200;
     dr["StartDate"] = DateTime.Now;
     dr["CreatedBy"] = "RAJA";
     dt.Rows.Add(dr);
     Parameter.Values = dt.Rows[0];
     DataTable dtQualification = new DataTable();
     dtQualification.Columns.Add("QualificationID", typeof(Guid));
     dtQualification.Columns.Add("Details", typeof(string));
     DataRow drQualification;
     drQualification = dtQualification.NewRow();
     drQualification["QualificationID"] = new Guid("5e48e449-fb3f-4352-9e11-080c91329566");
     drQualification["Details"] = "gsgssgsgs";
     dtQualification.Rows.Add(drQualification);
     Assert.AreEqual(true, target.AddNewEmployeeMaster(Parameter, dtQualification), "IGRSS.BusinessLogicLayer.Employee.AddNewEmployeeMaster did not return the expecte" +
             "d value.");
 }
コード例 #25
0
ファイル: ComplainTest.cs プロジェクト: UrviGandhi/IGRSS
 public void AddNewComplainTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     FormViewParameter Parameter = new FormViewParameter();
     IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable dt = new IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable();
     DataRow dr = dt.NewRow();
     dr["ComplainId"] = new Guid();
     dr["ComplaintNo"] = "YSL456";
     dr["ComplaintType"] = new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3");
     dr["AgainstEmpID"] = new Guid("3c1820f7-bf70-499d-af99-1eb47a33cd9a");
     dr["ComplainingEmpID"] = new Guid("3c1820f7-bf70-499d-af99-1eb47a33cd9a");
     dr["ComplainantName"] = "Sandhya";
     dr["ComplainantAddress"] = "BASKAR RAO,CHENNAI";
     dr["ComplaintDate"] =DateTime.Now;
     dr["ReceivingOfficeId"] = new Guid("d12d7a4b-bb0b-4af7-badf-03f44efd73e7");
     dr["Subject"] ="I AM NOT FILLING WELL SO I COULD'NT COME";
     dr["Detail"] = "I AM NOT FILLING WELL SO I COULD'NT COME";
     dr["CreatedBy"] = "admin";
     dt.Rows.Add(dr);
     Parameter.Values = dt.Rows[0];
     bool expected = true;
     Assert.AreEqual(expected,target.AddNewComplain(Parameter), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
             "");
 }
コード例 #26
0
ファイル: Employee.cs プロジェクト: UrviGandhi/IGRSS
        public bool UpdateQualificationMaster(FormViewParameter Parameter, Guid QualificationID)
        {
            string userName = Thread.CurrentPrincipal.Identity.Name;

            IGRSS.DataAccessLayer.Employee.QualificationMasterRow  row = (IGRSS.DataAccessLayer.Employee.QualificationMasterRow) Parameter.Values;
            try
            {
            int i=IgrssAdapters.QualificationMaster.UpdateQualificationMaster(QualificationID, row.Name, row.Description, userName, DateTime.Now);
            if (i == 1)
                return true;
            else
                return false;

            }
            catch (Exception ex)
            {
            if (ExceptionPolicy.HandleException(ex, "DAL"))
                throw;
            return false;
            }
        }
コード例 #27
0
ファイル: Employee.cs プロジェクト: UrviGandhi/IGRSS
        public bool UpdateEmployeeMaster(Guid EmployeeID, FormViewParameter Parameters, DataTable QualificationDetails)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            try
            {
                IGRSS.DataAccessLayer.Employee.EmployeeMasterRow row = (IGRSS.DataAccessLayer.Employee.EmployeeMasterRow) Parameters.Values;
                IgrssAdapters.EmployeeMaster.UpdateEmployeeMaster(EmployeeID,

                        row.EmployeeNo,
                        row.FirstName,
                        row.MiddleName,

                        row.PostalAddress,
                        row.PermanentAddress,
                        row.DateOfBirth,
                        row.FatherName,
                        row.Height,
                        row.VisibleMarks,
                        row.OfficeID,
                        row.DepartmentID,
                        row.DesignationID,
                        row.Salary,
                        row.Allowances,
                        row.StartDate,
                        row.EndDate,
                        curUser,
                        DateTime.Now);

                IgrssAdapters.EmployeeQualifications.DeleteEmployeeQualification(EmployeeID);
                foreach (DataRow drQualifications in QualificationDetails.Rows)
                {
                    IgrssAdapters.EmployeeQualifications.InsertEmployeeQualification((Guid) drQualifications["EmployeeQualiID"], EmployeeID, (Guid) drQualifications["QualificationID"], "", curUser, DateTime.Now);
                }

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
            }
            return true;
        }
コード例 #28
0
ファイル: Inspection.cs プロジェクト: UrviGandhi/IGRSS
        public bool UpdateYearlyInspection(FormViewParameter Parameter, DataTable ScheduleDetails, DataTable SelectedOffices,Guid ScheduleId)
        {
            IGRSS.DataAccessLayer.Inspection.InspectionYearlySheduleRow row = (IGRSS.DataAccessLayer.Inspection.InspectionYearlySheduleRow) Parameter.Values;
            string curUser = Thread.CurrentPrincipal.Identity.Name;

            IgrssAdapters.InspYearlyScheduleDetail.DeleteYearlyInspectionDetailsById(ScheduleId);

            IgrssAdapters.InspYearlyShedule.UpdateYearlyInspectionSchedules(ScheduleId, row.OfficerId, Guid.Empty, row.Year, row.Remarks, curUser, DateTime.Now);
            foreach (DataRow ScheduleDetail in ScheduleDetails.Rows)
            {
                IgrssAdapters.InspYearlyScheduleDetail.AddYearlyInspectionScheduleDetails((Guid)ScheduleDetail["DetailScheduleId"], ScheduleId, (decimal)ScheduleDetail["Month"], (string)ScheduleDetail["Remarks"], curUser, DateTime.Now);
            }
            foreach (DataRow SelectedOffice in SelectedOffices.Rows)
            {
                IgrssAdapters.InspYearlyScheduleMonthwise.AddYearlyScheduleMonthwise((Guid)SelectedOffice["MonthlyScheduleId"], (Guid)SelectedOffice["DetailScheduleId"], (Guid)SelectedOffice["InspectingOfficeId"]);
            }
            return true;
        }
コード例 #29
0
ファイル: Inspection.cs プロジェクト: UrviGandhi/IGRSS
        public bool UpdateInspectionTypeMaster(FormViewParameter Parameter, Guid InspectionTypeId)
        {
            IGRSS.DataAccessLayer.InspectionDetails.InspectionTypeMasterRow row = (IGRSS.DataAccessLayer.InspectionDetails.InspectionTypeMasterRow)Parameter.Values;
            string curUser = Thread.CurrentPrincipal.Identity.Name;

            IgrssAdapters.InspTypeMaster.UpdateInspectionTypeMaster(InspectionTypeId, row.Name, row.Description, curUser, DateTime.Now);

            return true;
        }
コード例 #30
0
ファイル: Inspection.cs プロジェクト: UrviGandhi/IGRSS
        public bool UpdateInspectionItenary(FormViewParameter Parameter,Guid ItenaryId, Guid ScheduleId)
        {
            IGRSS.DataAccessLayer.Inspection.InspectionItenaryRow row = (IGRSS.DataAccessLayer.Inspection.InspectionItenaryRow) Parameter.Values;

            string curUser = Thread.CurrentPrincipal.Identity.Name;

            IgrssAdapters.InspItenary.RemoveItenary(ItenaryId);
            IgrssAdapters.InspItenary.AddInspectionItenary(ItenaryId, ScheduleId, row.Month, row.InspectingDate, row.InspectingOfficeId, row.EndDate, row.ItenaryDetails, curUser, DateTime.Now);
            return true;
        }