Example #1
0
        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." +
                            "");
        }
Example #2
0
        /// <summary>
        /// This function will get the Complain Details.
        /// <param name="ComplainId"></param>
        /// </summary>
        /// <returns>DataTable</returns>
        public CompalinTable GetComplainDetailsByComplainId(Guid ComplainId)
        {
            CompalinTable dt = new CompalinTable();

            try
            {
                dt = IgrssAdapters.ComplainAdapter.GetComplainDetailByComplainId(ComplainId);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
            return(dt);
        }
Example #3
0
        /// <summary>
        /// This function will get the Complain Details.
        /// <param name="ComplaintNo"></param>
        /// </summary>
        /// <returns>CompalinTable</returns>
        public CompalinTable GetComplainDetailsByComplainNo(string ComplaintNo)
        {
            CompalinTable retData = new CompalinTable();

            try
            {
                retData = IgrssAdapters.ComplainAdapter.GetComplainDetail(ComplaintNo);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
            return(retData);
        }
 public ComplainAcceptedEventArgs(Guid InstanceId, Guid ComplaintType, Guid AgainstEmpID, Guid ComplainingEmpID, string ComplainantName, string ComplainantAddress, DateTime ComplaintDate, Guid ReceivingOfficeId, string Subject, string Detail, Guid ComplainId, string ComplaintNo)
     : base(InstanceId)
 {
     UpdatedRows = new CompalinTable();
     ComplainDetailsRow row = UpdatedRows.NewComplainDetailsRow();
     row.ComplaintType = ComplaintType;
     row.AgainstEmpID = AgainstEmpID;
     row.ComplainingEmpID = ComplainingEmpID;
     row.ComplainantName = ComplainantName;
     row.ComplainantAddress = ComplainantAddress;
     row.ComplaintDate = ComplaintDate;
     row.ReceivingOfficeId = ReceivingOfficeId;
     row.Subject = Subject;
     row.Detail = Detail;
     row.ComplainId = ComplainId;
     row.ComplaintNo = ComplaintNo;
     UpdatedRows.Rows.Add(row);
 }
        public ComplainAcceptedEventArgs(Guid InstanceId, Guid ComplaintType, Guid AgainstEmpID, Guid ComplainingEmpID, string ComplainantName, string ComplainantAddress, DateTime ComplaintDate, Guid ReceivingOfficeId, string Subject, string Detail, Guid ComplainId, string ComplaintNo)
            : base(InstanceId)
        {
            UpdatedRows = new CompalinTable();
            ComplainDetailsRow row = UpdatedRows.NewComplainDetailsRow();

            row.ComplaintType      = ComplaintType;
            row.AgainstEmpID       = AgainstEmpID;
            row.ComplainingEmpID   = ComplainingEmpID;
            row.ComplainantName    = ComplainantName;
            row.ComplainantAddress = ComplainantAddress;
            row.ComplaintDate      = ComplaintDate;
            row.ReceivingOfficeId  = ReceivingOfficeId;
            row.Subject            = Subject;
            row.Detail             = Detail;
            row.ComplainId         = ComplainId;
            row.ComplaintNo        = ComplaintNo;
            UpdatedRows.Rows.Add(row);
        }
Example #6
0
 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." +
             "");
 }
Example #7
0
 /// <summary>
 /// This function will get the Complain Details.
 /// <param name="ComplaintNo"></param>
 /// </summary>
 /// <returns>CompalinTable</returns>
 public CompalinTable GetComplainDetailsByComplainNo(string ComplaintNo)
 {
     CompalinTable retData = new CompalinTable();
     try
     {
         retData = IgrssAdapters.ComplainAdapter.GetComplainDetail(ComplaintNo);
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "DAL"))
             throw;
     }
     return retData;
 }
Example #8
0
 /// <summary>
 /// This function will get the Complain Details.
 /// <param name="ComplainId"></param>
 /// </summary>
 /// <returns>DataTable</returns>
 public CompalinTable GetComplainDetailsByComplainId(Guid ComplainId)
 {
     CompalinTable dt = new CompalinTable();
     try
     {
         dt=IgrssAdapters.ComplainAdapter.GetComplainDetailByComplainId(ComplainId);
     }
     catch (Exception ex)
     {
         if(ExceptionPolicy.HandleException(ex, "DAL"))
         throw;
     }
     return dt;
 }