public int UpdateControl(PageControlFormUI pageControlFormUI, int id)
        {
            int result = 0;

            result = pageControlFormDAL.UpdateControl(pageControlFormUI, id);
            return(result);
        }
        public int AddControl(PageControlFormUI pageControlFormUI)
        {
            int result = 0;

            result = pageControlFormDAL.AddControl(pageControlFormUI);
            return(result);
        }
        public int AddControl(PageControlFormUI controlMappingFormUI)
        {
            int result = 0;

            try
            {
                using (SqlConnection SupportCon = new SqlConnection(connectionString))
                {
                    SupportCon.Open();
                    SqlCommand sqlCmd = new SqlCommand("prControlMappingInsert", SupportCon);
                    sqlCmd.CommandType    = CommandType.StoredProcedure;
                    sqlCmd.CommandTimeout = commandTimeout;

                    sqlCmd.Parameters.Add("@PageMapping", SqlDbType.Int);
                    sqlCmd.Parameters["@PageMapping"].Value = controlMappingFormUI.PageMapping;

                    sqlCmd.Parameters.Add("@ControlMappingX", SqlDbType.VarChar, 50);
                    sqlCmd.Parameters["@ControlMappingX"].Value = controlMappingFormUI.ControlMappingX;

                    sqlCmd.Parameters.Add("@ControlMappingCode", SqlDbType.VarChar, 50);
                    sqlCmd.Parameters["@ControlMappingCode"].Value = controlMappingFormUI.ControlMappingCode;

                    sqlCmd.Parameters.Add("@CreatedOnDate", SqlDbType.DateTime);
                    sqlCmd.Parameters["@CreatedOnDate"].Value = controlMappingFormUI.CreatedOn;

                    result = sqlCmd.ExecuteNonQuery();

                    sqlCmd.Dispose();
                    SupportCon.Close();
                }
            }
            catch (Exception exp)
            {
                logExcpUIobj.MethodName       = "AddControl()";
                logExcpUIobj.ResourceName     = "PageControlFormDAL.cs";
                logExcpUIobj.RecordId         = "";
                logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
                logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

                log.Error("[PageControlFormDAL : AddControl] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
            }

            return(result);
        }